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 sign you use for references






2. A type of pointer that can point at objects of any data type.






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






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






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






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






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






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






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






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






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






12. All C++ Variables are_________.






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






14. A filestream variable that represents the default input source






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






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






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






18. A filestream variable that represents the default output device






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






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






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






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






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






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






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






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






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






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






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






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






31. Creates a copy of a string.






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






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






34. Used for function calls and local variables






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






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






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






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






39. Whole numbers - no decimals and no commas included






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






41. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.






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






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






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






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






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






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






48. A human readable file that contains C++ program






49. newline






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