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 size & shape & color and weight of an object are considered






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






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






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






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






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






7. An expression that has operands with different data types






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






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






10. * / % + -






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






12. Operator with two operands






13. If a member initializer is not provided for a member object of a class the object's __________ is called.






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






15. Preprocessor directive syntax






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






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






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






19. The stream extraction operator






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






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






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






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






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






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






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






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






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






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






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






31. Compares two strings and returns 0 if they are equal.






32. The stream insertion operator






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






34. Keyword public is a(n) _________






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. A human readable file that contains C++ program






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






38. Default name of executable file






39. Most calculations are normally performed by ______ statements.






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






41. C++ programs are normally typed into a computer using a(n) ________ program.






42. Used for dynamically allocated variables






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






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






45. The symbol for the binary scope resolution operator






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






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






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






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






50. Symbol that denotes an action to be performed