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. Compares two strings and returns 0 if they are equal.






2. tab






3. A________ allows the compiler to check the number & types and order of the arguments passed to a function.






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






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






6. A function that calls itself






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






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






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






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






11. Words that are used for special purposes in a program






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






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






14. Associate an identifier with a memory location






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






16. The ________ program transfers the executable image of a C++ program from disk to memory.






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






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






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






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






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






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






23. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.






24. Objects have the property of ________although objects may know how to communicate with one another across well-defined interfaces - they normally are not allowed to know how other objects are implemented.






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






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






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






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






29. A function is invoked with a ________.






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






31. These are data items whose values do not change while the program is running






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






33. For every opening brace in a C++ program there must be a ______________.






34. Symbol that denotes an action to be performed






35. * / % + -






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






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






38. The sign you use for references






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






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






41. The ________ statement in a called function passes the value of an expression back to the calling function.






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






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






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






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






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






47. int namespace include using return examples of ___________






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






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






50. An expression that has operands with different data types