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. Forces the computer to display decimal point and trailing zeroes






2. The _____ causes the contents of another file to be inserted into a program.






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






4. The stream extraction operator






5. The stream insertion operator






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






7. The sign you use for references






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






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






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






11. Preprocessor directive syntax






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






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






14. To allow file access in a program you must #include this header file.






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






16. Use 2 characters to represent one






17. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.






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






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






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






21. Executable version of program






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






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






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






25. Two slash marks ( // ) indicate __________ of a comment






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






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






28. A function is invoked with a ________.






29. = & | are examples of ____________.






30. Most calculations are normally performed by ______ statements.






31. Used for function calls and local variables






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






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






34. Words that are used for special purposes in a program






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. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.






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






38. Member objects are constructed __________ their enclosing class object.






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






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






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






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. This is used to mark the end of a complete C++ programming statement.






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






45. A function that can be used to read character data including whitespace






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






47. The sign you use for pointers






48. A function that calls itself






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






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