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. Returns the length of a string excluding the null terminator.






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






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






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






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






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






7. The process of determining if an array contains a particular key value is called _________ the array.






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






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






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






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






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






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






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






15. Associate an identifier with a memory location






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






17. The stream extraction operator






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






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






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






21. In inheritance the ____________ is the class that supplies the inherited members.






22. Operator with two operands






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






24. Keyword public is a(n) _________






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






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






27. An expression that has operands with different data types






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






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






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






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






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






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






34. Function ________ is used to produce random numbers.






35. Symbol that denotes an action to be performed






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






37. Manipulator that causes the insertion point (cursor) to move to the beginning of the next line

Warning: Invalid argument supplied for foreach() in /var/www/html/basicversity.com/show_quiz.php on line 183


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






39. Used for function calls and local variables






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






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






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






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






44. The sign you use for references






45. A __________ should be used to declare the size of an array because it makes the program more scalable.






46. A function is invoked with a ________.






47. A filestream variable that represents the default output device






48. An operator that can only be used with int values. result will always be an int.






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






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