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. Syntax for named constant declaration






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






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






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






5. A variable declared outside any block or function is a ________ variable.






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






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






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






9. newline






10. * / % + -






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






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






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






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






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






16. Type casting syntax






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






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






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






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






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






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






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






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






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. This manipulator is used to establish a field width for the value immediately following it.






27. data types that refer to numbers with decimals






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






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






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






31. An expression that has operands with different data types






32. Operator with only one operand






33. Lists and tables of values can be stored in arrays or __________.






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






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






36. Identifier or expression that is part of the calculation to be performed






37. tab






38. C++ programs are normally typed into a computer using a(n) ________ program.






39. Associate an identifier with a memory location






40. The sign you use for references






41. = & | are examples of ____________.






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






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






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






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






46. An expression in which all operands have the same data type - result will have the same data type as operands






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






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






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






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