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. Class members specified as _________ are accessible anywhere an object of the class is in scope.






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






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






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






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






6. Operator with only one operand






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






8. data types that refer to numbers with decimals






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






10. Preprocessor directive syntax






11. The sign you use for pointers






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






13. Sets floating-point values to a fixed decimal format






14. Operator with two operands






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






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






17. The symbol for the binary scope resolution operator






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






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






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






21. A function is invoked with a ________.






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






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






24. Type casting syntax






25. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.






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






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






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






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






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






31. Function ________ is used to produce random numbers.






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






33. Nonexecutable statements that are included in a program to provide information about what the program does etc.






34. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.






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






36. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.






37. Naming convention for C++ programs






38. A filestream variable that represents the default input source






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






40. Characters used to separate symbols or reserved words or identifiers and statements






41. Whole numbers - no decimals and no commas included






42. For a local variable in a function to retain its value between calls to the function it must be declared with the ________ storage-class specifier.






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






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






45. A variable declared outside any block or function is a ________ variable.






46. The modulus operator (%) can be used only with __________.






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






48. The stream insertion operator






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






50. Symbol that denotes an action to be performed