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 stream extraction operator






2. In inheritance the ____________ is the class the receives the inherited members.






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






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






5. A function is invoked with a ________.






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






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






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






10. The only integer that can be assigned directly to a pointer is_____________.






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






12. Class members specified as _________ are accessible anywhere an object of the class is in scope.






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






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






15. Keyword public is a(n) _________






16. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.






17. int namespace include using return examples of ___________






18. A function that calls itself






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






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






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






22. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.






23. To allow file access in a program you must #include this header file.






24. The _________ begins the body of every function and the _________ ends the body of every function.






25. Type casting syntax






26. An expression that has operands with different data types






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






28. A member function should be declared static if it does not access __________ class members.






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






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






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






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






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






34. Header file that contains commonly performed mathematical functions






35. * / % + -






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






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






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






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






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






41. This manipulator causes the field to be left-justified with padding spaces printed to the right.






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






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






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






45. The stream insertion operator






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






47. A program that finds and attaches to your program the indicated libraries for compilation






48. The escape sequence ___ when output with cout and the stream insertion operator - causes the cursor to position to the beginning of the next line on the screen.






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






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