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. A function is invoked with a ________.






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






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






4. The sign you use for pointers






5. The symbol for the binary scope resolution operator






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






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






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






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






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






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






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






13. * / % + -






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






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






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






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






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






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






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






21. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.






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






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






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






25. Associate an identifier with a memory location






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






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






28. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.






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






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






31. Type casting syntax






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






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






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






35. A pointer is a variable that contains as its value the____________ of another variable.






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






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






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






39. Keyword public is a(n) _________






40. Operator with only one operand






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






42. Most calculations are normally performed by ______ statements.






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






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






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






46. Executable version of program






47. tab






48. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.






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






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