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 ways to return control from a called function to a caller are ________ - return expression and encounter.






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






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






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






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






6. newline






7. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.






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






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






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






11. A variable that holds the address of another variable.






12. OOD also takes advantage of ________ relationships where new classes of objects are derived by absorbing characteristics of existing classes - then adding unique characteristics of their own.






13. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.






14. A function that calls itself






15. The sign you use for references






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






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






18. Function ________ is used to set the random number seed to randomize a program.






19. Causes the program to immediately goes back to the top of the loop. the remainder of the statements in the loop are ignored for this current iteration.






20. A variable that is known only within the function in which it is defined is called a ________.






21. * / % + -






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






23. Use 2 characters to represent one






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






25. A filestream variable that represents the default input source






26. Naming convention for C++ programs






27. The elements of an array are related by the fact that they have the same name and ___________.






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






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






30. The idea that you can call the same function and the output will depend on the type of object you're using.






31. Used for dynamically allocated variables






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






33. int namespace include using return examples of ___________






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






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






36. When it is not known in advance how many times a set of statements will be repeated a _________value can be used to terminate the repetition.






37. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.






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






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






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






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






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






43. All C++ Variables are_________.






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






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






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






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






48. Operator with two operands






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






50. When a value of one data type is implicitly (automatically) changed to another data type