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. A set of values together with a set of operations






2. A filestream variable that represents the default output device






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






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






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






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






7. All C++ Variables are_________.






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






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






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






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. Whole numbers - no decimals and no commas included






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






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






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


16. The address-of operator. it is used to assign pointers and to print the address of variables.






17. Naming convention for C++ programs






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






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






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






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






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






23. = & | are examples of ____________.






24. data types that refer to numbers with decimals






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






26. Used for dynamically allocated variables






27. Header file that contains commonly performed mathematical functions






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






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






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






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






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






33. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.






34. The sign you use for pointers






35. The stream insertion operator






36. The size & shape & color and weight of an object are considered






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






38. These are data items whose values do not change while the program is running






39. Operator with only one operand






40. Type casting syntax






41. * / % + -






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






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






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






45. The ________ qualifier is used to declare read-only variables.






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






47. Characters used to separate symbols or reserved words or identifiers and statements






48. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.






49. A function that calls itself either directly or indirectly - through another function) - is a ________ function.






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