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. The three values that can be used to initialize a pointer are 0 - __________ and an address.






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






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






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






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






6. A sequence of operands and operators that describe a calculation to be performed






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






8. * / % + -






9. Symbol that denotes an action to be performed






10. Two slash marks ( // ) indicate __________ of a comment






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






12. Naming convention for C++ programs






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






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






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






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






17. A file must be ________ before data can be written to or read from it.






18. int namespace include using return examples of ___________






19. Operator with only one operand






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






21. Function ________ is used to produce random numbers.






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






23. A function that calls itself






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






25. The sign you use for references






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






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






28. tab






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






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






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






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






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






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






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






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






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






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






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






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


41. Initializers __________ must be used to initialize constant members of a class.






42. An expression that has operands with different data types






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






44. The three ways to return control from a called function to a caller are ________ - return expression and encounter.






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






46. A filestream variable that represents the default output device






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






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






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






50. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.