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. Lists and tables of values can be stored in arrays or __________.






2. Words that are used for special purposes in a program






3. The stream extraction operator






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






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






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






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






8. Whole numbers - no decimals and no commas included






9. __________ can be used to assign an object of a class to another object of the same class.






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






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






12. Operator with two operands






13. Keyword public is a(n) _________






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






16. For every opening brace in a C++ program there must be a ______________.






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






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






19. To allow file access in a program you must #include this header file.






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






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






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






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






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






25. A function is invoked with a ________.






26. A __________ data member represents class-wide information.






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






28. Type casting syntax






29. Objects have the property of ________although objects may know how to communicate with one another across well-defined interfaces - they normally are not allowed to know how other objects are implemented.






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






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






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






33. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.






34. data types that refer to numbers with decimals






35. The sign you use for pointers






36. Naming convention for C++ programs






37. newline






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






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






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






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






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






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






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






45. The ________ program transfers the executable image of a C++ program from disk to memory.






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






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






48. Executable version of program






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






50. A function that calls itself