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






2. Type casting syntax






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






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






5. Symbol that denotes an action to be performed






6. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.






7. Operator with two operands






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






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






10. Default name of executable file






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. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.






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






14. = & | are examples of ____________.






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






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






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






18. newline






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






20. A human readable file that contains C++ program






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






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






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






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






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






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






27. Nonexecutable statements that are included in a program to provide information about what the program does etc.






28. * / % + -






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






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






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






32. The process of analyzing and designing a system from an object-oriented point of view is called ________.






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






34. The conditional operator. it evaluates a line of code and returns one thing if the condition is true and a different thing if the condition is false.






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






36. Use 2 characters to represent one






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






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






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






40. All C++ Variables are_________.






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






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






43. Names of things that are used in a program - can apply to variables & constants and functions






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






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






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






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






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






49. The ________ statement in a called function passes the value of an expression back to the calling function.






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