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 escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.






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






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






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






5. Used for function calls and local variables






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






7. A function ________ enables a single function to be defined to perform a task on many different data types.






8. = & | are examples of ____________.






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






10. The ________ program transfers the executable image of a C++ program from disk to memory.






11. Associate an identifier with a memory location






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






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






14. The sign you use for pointers






15. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.






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






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






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






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






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






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






22. Operator with only one operand






23. Causes the program to immediately goes back to the top of the loop. the remainder of the statements in the loop are ignored for this current iteration.






24. Used for dynamically allocated variables






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






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






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






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






29. A variable that holds the address of another variable.






30. The __________ operator reclaims memory previously allocated by new.






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






32. Type casting syntax






33. A human readable file that contains C++ program






34. The conditional operator. it evaluates a line of code and returns one thing if the condition is true and a different thing if the condition is false.






35. Default name of executable file






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






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






38. Creates a copy of a string.






39. * / % + -






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






41. Preprocessor directive syntax






42. Executable version of program






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






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






45. The ________ enables access to a global variable with the same name as a variable in the current scope.






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






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






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






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






50. An operator that can only be used with int values. result will always be an int.