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. Allows the programmer to store a value in a variable






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






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 address-of operator. it is used to assign pointers and to print the address of variables.






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






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






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






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






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






10. Forces the computer to display decimal point and trailing zeroes






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






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






13. Repeating a set of instructions a specific number of times is called_________repetition.






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






15. Type casting syntax






16. Naming convention for C++ programs






17. Preprocessor directive syntax






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






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






20. A file must be ________ before data can be written to or read from it.






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






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






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






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






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






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






27. If a member initializer is not provided for a member object of a class the object's __________ is called.






28. Classes can have relationships with other classes. These relationships are called ________.






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






30. Every C++ statement ends with a(n) _________.






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






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






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






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






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






37. = & | are examples of ____________.






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






39. A recursive function typically has two components: One that provides a means for the recursion to terminate by testing for a(n) ________ case and one that expresses the problem as a recursive call for a slightly simpler problem than the original call






40. For every opening brace in a C++ program there must be a ______________.






41. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.






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






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






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






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






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






47. A set of values together with a set of operations






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






49. The process of placing the elements of an array in order is called ________ the array.






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