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. Function ________ is used to produce random numbers.






2. Operator with only one operand






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






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






5. The stream extraction operator






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






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






8. The conditional operator. it evaluates a line of code and returns one thing if the condition is true and a different thing if the condition is false.






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






10. An array that uses two subscripts is referred to as a(n) _________ array.






11. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .






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






13. The stream insertion operator






14. The process of analyzing and designing a system from an object-oriented point of view is called ________.






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






16. The escape sequence ___ when output with cout and the stream insertion operator - causes the cursor to position to the beginning of the next line on the screen.






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






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






19. When you create a ___________________in the base class and then call it using an object the function will know to look in the inherited class for the specifics of that function.






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






21. Used to qualify hidden names so that they can be used.






22. data types that refer to numbers with decimals






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






24. A filestream variable that represents the default output device






25. int namespace include using return examples of ___________






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






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






28. The storage-class specifiers are mutable - auto - ________ - extern and static.






29. Operator with two operands






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






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






32. Creates a copy of a string.






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






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






35. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution






36. Preprocessor directive syntax






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






38. Syntax for named constant declaration






39. newline






40. C++ programs are normally typed into a computer using a(n) ________ program.






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






42. Member objects are constructed __________ their enclosing class object.






43. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.






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






45. A memory location with a name and data type - its content may be changed during program execution






46. A ________ program executes before the compiler's translation phase begins.






47. Compares two strings and returns 0 if they are equal.






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






49. The size & shape & color and weight of an object are considered






50. = & | are examples of ____________.