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






2. Most calculations are normally performed by ______ statements.






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






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






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






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






7. Executable version of program






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






9. Used for dynamically allocated variables






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






11. = & | are examples of ____________.






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






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






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






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






16. A filestream variable that represents the default input source






17. directive A statement that starts with a # is called a ____________.






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






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






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






21. Header file that contains commonly performed mathematical functions






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






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






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






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






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






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






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






29. A member function should be declared static if it does not access __________ class members.






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






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






32. A constant object must be __________; it cannot be modified after it is created.






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






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






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






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






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






38. The ________ enables access to a global variable with the same name as a variable in the current scope.






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






40. Classes can have relationships with other classes. These relationships are called ________.






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






42. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution






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






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






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






46. Returns the length of a string excluding the null terminator.






47. Preprocessor directive syntax






48. Creates a copy of a string.






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






50. The symbol for the binary scope resolution operator