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






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






3. * / % + -






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






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






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






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. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.






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






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






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






12. A function that calls itself






13. Type casting syntax






14. The sign you use for pointers






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






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






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






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






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






20. int namespace include using return examples of ___________






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 function ________ enables a single function to be defined to perform a task on many different data types.






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






24. Smallest individual unit of a programming language - special symbols or word symbols or identifiers






25. This manipulator is used to establish a field width for the value immediately following it.






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






27. A memory location with a name and data type - its content may be changed during program execution






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






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






30. To write data to a file you define an object of which one of the following






31. All C++ Variables are_________.






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






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






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






35. A function is invoked with a ________.






36. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.






37. Default name of executable file






38. Operator with only one operand






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






40. The symbol for the binary scope resolution operator






41. A filestream variable that represents the default input source






42. The number used to refer to a particular element of an array is called its ________.






43. Naming convention for C++ programs






44. Whole numbers - no decimals and no commas included






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






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






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






48. Preprocessor directive syntax






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






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