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 four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.






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






3. Every C++ statement ends with a(n) _________.






4. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.






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






6. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.






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






8. data types that refer to numbers with decimals






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






10. A __________ should be used to declare the size of an array because it makes the program more scalable.






11. A function that calls itself






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






13. Type casting syntax






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






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






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






17. Most calculations are normally performed by ______ statements.






18. A C++ statement that makes a decision is ______.






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






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






21. Naming convention for C++ programs






22. Characters used to separate symbols or reserved words or identifiers and statements






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






24. Creates a copy of a string.






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






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






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






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






29. The sign you use for pointers






30. directive A statement that starts with a # is called a ____________.






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






32. You can declare default values for a function in the ____________________.






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






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






35. The sign you use for references






36. The symbol for the binary scope resolution operator






37. Keyword public is a(n) _________






38. The escape sequence ___ when output with cout and the stream insertion operator - causes the cursor to position to the beginning of the next line on the screen.






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






40. Lists and tables of values can be stored in arrays or __________.






41. = & | are examples of ____________.






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






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






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






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






46. Executable version of program






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






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






49. int namespace include using return examples of ___________






50. The address-of operator. it is used to assign pointers and to print the address of variables.