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. directive A statement that starts with a # is called a ____________.






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






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






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






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






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






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






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






9. A set of values together with a set of operations






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






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






12. Returns the length of a string excluding the null terminator.






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






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






15. * / % + -






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






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






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






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






20. A function is invoked with a ________.






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






22. int namespace include using return examples of ___________






23. A function that can be used to read character data including whitespace






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






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






26. Type casting syntax






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






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






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






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






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






32. = & | are examples of ____________.






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






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






35. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________






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






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






38. All C++ Variables are_________.






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






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






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






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






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






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






45. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.






46. Associate an identifier with a memory location






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






48. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution






49. The stream insertion operator






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