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. Syntax for named constant declaration






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






3. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')






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






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






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






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






8. A type of pointer that can point at objects of any data type.






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






10. For every opening brace in a C++ program there must be a ______________.






11. Type casting syntax






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






13. Identifier or expression that is part of the calculation to be performed






14. The _________ begins the body of every function and the _________ ends the body of every function.






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






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






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






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






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






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






21. Whole numbers - no decimals and no commas included






22. Associate an identifier with a memory location






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






24. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.






25. Allows the programmer to store a value in a variable






26. A filestream variable that represents the default output device






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






28. Function ________ is used to produce random numbers.






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






30. Grammar rules of the language; compiler will try to identify and locate syntax errors






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






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






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






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






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






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






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






38. All C++ Variables are_________.






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






40. tab






41. A filestream variable that represents the default input source






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






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






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






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






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






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






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






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






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