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. An operator that can only be used with int values. result will always be an int.






2. The stream extraction operator






3. Associate an identifier with a memory location






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. int namespace include using return examples of ___________






6. Symbol that denotes an action to be performed






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






8. Used for dynamically allocated variables






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






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






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






12. The ________ program combines the output of the compiler with various library functions to produce an executable image.






13. In inheritance the ____________ is the class that supplies the inherited members.






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






15. = & | are examples of ____________.






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






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






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






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






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






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






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






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






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






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






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






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






28. Preprocessor directive syntax






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






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






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






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






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






34. Type casting syntax






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






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






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






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






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






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






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






42. All C++ Variables are_________.






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






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






45. Names of things that are used in a program - can apply to variables & constants and functions






46. A filestream variable that represents the default output device






47. Initializers __________ must be used to initialize constant members of a class.






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






49. Keyword public is a(n) _________






50. Function ________ is used to produce random numbers.