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. An array that uses two subscripts is referred to as a(n) _________ array.






2. Function ________ is used to set the random number seed to randomize a program.






3. In inheritance the ____________ is the class that supplies the inherited members.






4. Initializers __________ must be used to initialize constant members of a class.






5. The elements of an array are related by the fact that they have the same name and ___________.






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






7. Executable version of program






8. The keyword ________ is used in a function header to indicate that a function does not return a value or to indicate that a function contains no parameters.






9. OOD also takes advantage of ________ relationships where new classes of objects are derived by absorbing characteristics of existing classes - then adding unique characteristics of their own.






10. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.






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






12. Two slash marks ( // ) indicate __________ of a comment






13. Class members specified as _________ are accessible anywhere an object of the class is in scope.






14. A recursive function typically has two components: One that provides a means for the recursion to terminate by testing for a(n) ________ case and one that expresses the problem as a recursive call for a slightly simpler problem than the original call






15. A variable that holds the address of another variable.






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






17. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')






18. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.






19. Whole numbers - no decimals and no commas included






20. 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.






21. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.






22. * / % + -






23. Used for dynamically allocated variables






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






25. An expression in which all operands have the same data type - result will have the same data type as operands






26. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.






27. The modulus operator (%) can be used only with __________.






28. An operator that can only be used with int values. result will always be an int.






29. To write data to a file you define an object of which one of the following






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






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






32. Names of things that are used in a program - can apply to variables & constants and functions






33. The only integer that can be assigned directly to a pointer is_____________.






34. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.






35. Causes the program to immediately goes back to the top of the loop. the remainder of the statements in the loop are ignored for this current iteration.






36. The ________ qualifier is used to declare read-only variables.






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






38. Identifier or expression that is part of the calculation to be performed






39. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.






40. Use 2 characters to represent one






41. data types that refer to numbers with decimals






42. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.






43. For a local variable in a function to retain its value between calls to the function it must be declared with the ________ storage-class specifier.






44. The symbol for the binary scope resolution operator






45. To explicitly indicate that a value is to be converted to another type






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






47. All C++ Variables are_________.






48. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.






49. A member function should be declared static if it does not access __________ class members.






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