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 filestream variable that represents the default output device






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






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






4. An expression that has operands with different data types






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






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






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






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






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






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






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






13. Function ________ is used to set the random number seed to randomize a program.






14. Creates a copy of a string.






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






16. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.






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






18. Use 2 characters to represent one






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






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






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






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






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






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






25. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.






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






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






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






29. Most calculations are normally performed by ______ statements.






30. Naming convention for C++ programs






31. A function that calls itself






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






33. A function is invoked with a ________.






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






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 function ________ enables a single function to be defined to perform a task on many different data types.






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






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






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






40. Used for dynamically allocated variables






41. Used to qualify hidden names so that they can be used.






42. The sign you use for references






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






44. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.






45. The storage-class specifiers are mutable - auto - ________ - extern and static.






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






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






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






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






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