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 three ways to return control from a called function to a caller are ________ - return expression and encounter.






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






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






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






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






6. Syntax for named constant declaration






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






8. Whole numbers - no decimals and no commas included






9. A function that calls itself either directly or indirectly - through another function) - is a ________ function.






10. Preprocessor directive syntax






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






12. Operator with two operands






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






14. Member objects are constructed __________ their enclosing class object.






15. Used for dynamically allocated variables






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






17. All C++ Variables are_________.






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






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






20. tab






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






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






23. Forces the computer to display decimal point and trailing zeroes






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






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






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






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






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






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






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






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






32. The ________ qualifier is used to declare read-only variables.






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






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






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






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






37. A________ allows the compiler to check the number & types and order of the arguments passed to a function.






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






39. int namespace include using return examples of ___________






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






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






42. A function that calls itself






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






44. __________ can be used to assign an object of a class to another object of the same class.






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






46. Type casting syntax






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






48. Executable version of program






49. Class members are accessed via the ________ operator in conjunction with the name of an object (or reference to an object) of the class or via the arrow (->) operator in conjunction with a pointer to an object of the class.






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