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. Classes can have relationships with other classes. These relationships are called ________.






2. The symbol for the binary scope resolution operator






3. Executable version of program






4. Syntax for named constant declaration






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






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






7. Used for dynamically allocated variables






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






9. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.






10. A function that calls itself either directly or indirectly - through another function) - is a ________ function.






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






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






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






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






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






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






17. Operator with two operands






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






19. The size & shape & color and weight of an object are considered






20. A filestream variable that represents the default output device






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






22. An expression that has operands with different data types






23. When a value of one data type is implicitly (automatically) changed to another data type






24. Type casting syntax






25. An expression in which all operands have the same data type - result will have the same data type as operands






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






27. The stream insertion operator






28. To write data to a file you define an object of which one of the following






29. The process of analyzing and designing a system from an object-oriented point of view is called ________.






30. Use 2 characters to represent one






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






32. data types that refer to numbers with decimals






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






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






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






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






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






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






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






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






41. The sign you use for pointers






42. Whole numbers - no decimals and no commas included






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






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






45. newline






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






47. * / % + -






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






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






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