Test your basic knowledge |

C++ Programming Basics

Subject : it-skills
Instructions:
  • Answer 50 questions in 15 minutes.
  • If you are not ready to take this test, you can study here.
  • Match each statement with the correct term.
  • Don't refresh. All questions and answers are randomly picked and ordered every time you load a test.

This is a study tool. The 3 wrong answers for each question are randomly chosen from answers to other questions. So, you might find at times the answers obvious, but you will see it re-enforces your understanding as you take the test each time.
1. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.






2. The symbol for the binary scope resolution operator






3. The ________ program combines the output of the compiler with various library functions to produce an executable image.






4. The ________ enables access to a global variable with the same name as a variable in the current scope.






5. Returns the length of a string excluding the null terminator.






6. A constant object must be __________; it cannot be modified after it is created.






7. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.






8. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time






9. The ________ of an identifier is the portion of the program in which the identifier can be used.






10. The three values that can be used to initialize a pointer are 0 - __________ and an address.






11. Grammar rules of the language; compiler will try to identify and locate syntax errors






12. The process of determining if an array contains a particular key value is called _________ the array.






13. Most calculations are normally performed by ______ statements.






14. A variable that is known only within the function in which it is defined is called a ________.






15. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.






16. tab






17. Every C++ program begins execution at the function _________.






18. Operator with only one operand






19. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors






20. Class members are accessed via the ________ operator in conjunction with the name of an object (or reference to an object) of the class or via the arrow (->) operator in conjunction with a pointer to an object of the class.






21. A __________ data member represents class-wide information.






22. Naming convention for C++ programs






23. Whole numbers - no decimals and no commas included






24. A filestream variable that represents the default output device






25. The _________ begins the body of every function and the _________ ends the body of every function.






26. Program components in C++ are called functions and ________.






27. A type of pointer that can point at objects of any data type.






28. When it is not known in advance how many times a set of statements will be repeated a _________value can be used to terminate the repetition.






29. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.






30. Use 2 characters to represent one






31. The _____ causes the contents of another file to be inserted into a program.






32. If a member initializer is not provided for a member object of a class the object's __________ is called.






33. A C++ statement that makes a decision is ______.






34. A sequence of operands and operators that describe a calculation to be performed






35. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.






36. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.






37. To allow file access in a program you must #include this header file.






38. The number used to refer to a particular element of an array is called its ________.






39. Repeating a set of instructions a specific number of times is called_________repetition.






40. A program that finds and attaches to your program the indicated libraries for compilation






41. When a value of one data type is implicitly (automatically) changed to another data type






42. Header file that contains commonly performed mathematical functions






43. Sets floating-point values to a fixed decimal format






44. The process of placing the elements of an array in order is called ________ the array.






45. Preprocessor directive syntax






46. You must have a ___________ for every variable you intend to use in a program






47. Nonexecutable statements that are included in a program to provide information about what the program does etc.






48. Classes can have relationships with other classes. These relationships are called ________.






49. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.






50. A function is invoked with a ________.