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. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.






2. Symbol that denotes an action to be performed






3. A constant object must be __________; it cannot be modified after it is created.






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






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






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






7. The idea that you can call the same function and the output will depend on the type of object you're using.






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






9. A function ________ enables a single function to be defined to perform a task on many different data types.






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






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






12. = & | are examples of ____________.






13. Used for dynamically allocated variables






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






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






16. The symbol for the binary scope resolution operator






17. newline






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






19. * / % + -






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






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






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






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






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






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






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






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






28. The three ways to return control from a called function to a caller are ________ - return expression and encounter.






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






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






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






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






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






34. Every C++ program begins execution at the function _________.






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






36. Most calculations are normally performed by ______ statements.






37. This manipulator causes the field to be left-justified with padding spaces printed to the right.






38. All ______ must be declared before they are used.






39. An expression that has operands with different data types






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






41. Used for function calls and local variables






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






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






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






45. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.






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






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






48. Associate an identifier with a memory location






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






50. Use 2 characters to represent one