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. directive A statement that starts with a # is called a ____________.






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






3. Class members specified as _________ are accessible anywhere an object of the class is in scope.






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






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






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






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






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






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






10. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.






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






12. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.






13. A filestream variable that represents the default output device






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






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






16. Used for dynamically allocated variables






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






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






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






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






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






22. Executable version of program






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






24. Naming convention for C++ programs






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






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






27. Repeating a set of instructions a specific number of times is called_________repetition.






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






29. Syntax for named constant declaration






30. Sets floating-point values to a fixed decimal format






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






32. Type casting syntax






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






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






35. A function that calls itself






36. = & | are examples of ____________.






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






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






39. A __________ data member represents class-wide information.






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






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






42. int namespace include using return examples of ___________






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






44. The sign you use for pointers






45. A ________ program executes before the compiler's translation phase begins.






46. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________






47. The process of determining if an array contains a particular key value is called _________ the array.






48. A filestream variable that represents the default input source






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






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