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 __________ operator reclaims memory previously allocated by new.






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






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






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






5. Preprocessor directive syntax






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






7. Keyword public is a(n) _________






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






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






10. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.






11. The symbol for the binary scope resolution operator






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






13. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.






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






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






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






17. You must have a ___________ for every variable you intend to use in a program






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






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






20. Use 2 characters to represent one






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






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






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. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.






25. To explicitly indicate that a value is to be converted to another type






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






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






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






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






30. The stream insertion operator






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






32. int namespace include using return examples of ___________






33. An expression that has operands with different data types






34. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.






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






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






37. When you create a ___________________in the base class and then call it using an object the function will know to look in the inherited class for the specifics of that function.






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






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






40. data types that refer to numbers with decimals






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






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






43. tab






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






45. OOD also takes advantage of ________ relationships where new classes of objects are derived by absorbing characteristics of existing classes - then adding unique characteristics of their own.






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






47. Executable version of program






48. The three ways to return control from a called function to a caller are ________ - return expression and encounter.






49. Creates a copy of a string.






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