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 ________ program executes before the compiler's translation phase begins.






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






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






4. Used for function calls and local variables






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






6. The size & shape & color and weight of an object are considered






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






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






9. Symbol that denotes an action to be performed






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






11. Whole numbers - no decimals and no commas included






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






13. Naming convention for C++ programs






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






15. A pointer is a variable that contains as its value the____________ of another variable.






16. Creates a copy of a string.






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






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






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






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






21. Associate an identifier with a memory location






22. The stream insertion operator






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






24. A filestream variable that represents the default input source






25. The symbol for the binary scope resolution operator






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






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






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






29. A variable that is known only within the function in which it is defined is called a ________.






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






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






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






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






34. This is used to mark the end of a complete C++ programming statement.






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






36. To write data to a file you define an object of which one of the following






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






38. Causes the program to immediately goes back to the top of the loop. the remainder of the statements in the loop are ignored for this current iteration.






39. Use 2 characters to represent one






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






41. = & | are examples of ____________.






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






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






44. A filestream variable that represents the default output device






45. tab






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






47. A function that calls itself






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






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






50. All C++ Variables are_________.