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. Syntax for named constant declaration






2. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________






3. Preprocessor directive syntax






4. Whole numbers - no decimals and no commas included






5. * / % + -






6. This manipulator is used to establish a field width for the value immediately following it.






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






8. directive A statement that starts with a # is called a ____________.






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






10. An expression that has operands with different data types






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






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






13. This is used to mark the end of a complete C++ programming statement.






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. The number used to refer to a particular element of an array is called its ________.






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






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






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






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






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






21. A human readable file that contains C++ program






22. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.






23. Manipulator that causes the insertion point (cursor) to move to the beginning of the next line

Warning: Invalid argument supplied for foreach() in /var/www/html/basicversity.com/show_quiz.php on line 183


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






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






26. Allows the programmer to store a value in a variable






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






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






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






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






31. A function that calls itself






32. The __________ operator reclaims memory previously allocated by new.






33. Operator with only one operand






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






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






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






37. A filestream variable that represents the default input source






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






39. __________ can be used to assign an object of a class to another object of the same class.






40. A function that can be used to read character data including whitespace






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






42. Keyword public is a(n) _________






43. In inheritance the ____________ is the class the receives the inherited members.






44. Every C++ statement ends with a(n) _________.






45. You can declare default values for a function in the ____________________.






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






47. Operator with two operands






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






49. int namespace include using return examples of ___________






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