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. Whole numbers - no decimals and no commas included






2. = & | are examples of ____________.






3. The symbol for the binary scope resolution operator






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






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






6. Words that are used for special purposes in a program






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






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






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






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






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






12. Message displayed to the screen asking user for input; generated with an output statement






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






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






15. data types that refer to numbers with decimals






16. A sequence of operands and operators that describe a calculation to be performed






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






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






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






20. int namespace include using return examples of ___________






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






22. Preprocessor directive syntax






23. An expression that has operands with different data types






24. Objects have the property of ________although objects may know how to communicate with one another across well-defined interfaces - they normally are not allowed to know how other objects are implemented.






25. Associate an identifier with a memory location






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






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






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






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






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






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






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






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






34. Header file that contains commonly performed mathematical functions






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






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






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






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






39. Operator with two operands






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






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






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






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






44. Most calculations are normally performed by ______ statements.






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






46. A filestream variable that represents the default input source






47. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time






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






49. For a local variable in a function to retain its value between calls to the function it must be declared with the ________ storage-class specifier.






50. A function that calls itself