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. The three values that can be used to initialize a pointer are 0 - __________ and an address.






2. Associate an identifier with a memory location






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






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






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






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






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






8. A program that finds and attaches to your program the indicated libraries for compilation






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






10. A filestream variable that represents the default input source






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






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






13. The sign you use for pointers






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






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






16. Operator with two operands






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






18. Type casting syntax






19. int namespace include using return examples of ___________






20. The elements of an array are related by the fact that they have the same name and ___________.






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






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






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






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






25. Message displayed to the screen asking user for input; generated with an output statement






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






27. Class members specified as _________ are accessible only to member functions of the class and friends of the class.






28. A sequence of operands and operators that describe a calculation to be performed






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






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






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






32. To explicitly indicate that a value is to be converted to another type






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






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






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






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






37. Most calculations are normally performed by ______ statements.






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






39. Smallest individual unit of a programming language - special symbols or word symbols or identifiers






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






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






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






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






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






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






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






47. The sign you use for references






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






49. The address-of operator. it is used to assign pointers and to print the address of variables.






50. Use 2 characters to represent one