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. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.






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






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






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






5. Executable version of program






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






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






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






9. Type casting syntax






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






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






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






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






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






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






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






17. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.






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






19. The stream insertion operator






20. A __________ should be used to declare the size of an array because it makes the program more scalable.






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






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






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






24. The _____ causes the contents of another file to be inserted into a program.






25. Default name of executable file






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






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






28. Associate an identifier with a memory location






29. The sign you use for references






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






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






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






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






34. Naming convention for C++ programs






35. Creates a copy of a string.






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






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






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






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






40. Most calculations are normally performed by ______ statements.






41. A filestream variable that represents the default output device






42. Operator with two operands






43. An expression that has operands with different data types






44. * / % + -






45. Header file that contains commonly performed mathematical functions






46. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.






47. All C++ Variables are_________.






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






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






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