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. Operator with only one operand






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






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






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






5. The process of determining if an array contains a particular key value is called _________ the array.






6. Lists and tables of values can be stored in arrays or __________.






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






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






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






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






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






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






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






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






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






16. newline






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






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






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






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






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






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






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






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






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






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






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






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






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






30. An expression that has operands with different data types






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






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






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






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






35. Forces the computer to display decimal point and trailing zeroes






36. The ________ enables access to a global variable with the same name as a variable in the current scope.






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






38. The stream insertion operator






39. Symbol that denotes an action to be performed






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






41. A filestream variable that represents the default output device






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






43. Operator with two operands






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






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






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






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






48. Preprocessor directive syntax






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






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