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 __________ data member represents class-wide information.






2. An array that uses two subscripts is referred to as a(n) _________ array.






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






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






5. This manipulator is used to establish a field width for the value immediately following it.






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






7. Operator with two operands






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






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






10. Class members specified as _________ are accessible only to member functions of the class and friends of the class.






11. Keyword public is a(n) _________






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






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






14. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.






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






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






17. Message displayed to the screen asking user for input; generated with an output statement






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






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






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






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






22. Syntax for named constant declaration






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






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






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






26. Used for function calls and local variables






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






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






29. A filestream variable that represents the default input source






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






31. Most calculations are normally performed by ______ statements.






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






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






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






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






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






37. = & | are examples of ____________.






38. Type casting syntax






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






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






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






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






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






44. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.






45. Naming convention for C++ programs






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






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






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






49. A function that calls itself






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