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 __________ should be used to declare the size of an array because it makes the program more scalable.






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






3. Operator with only one operand






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






5. A memory location with a name and data type - its content may be changed during program execution






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






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






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






9. A function that calls itself






10. A variable declared outside any block or function is a ________ variable.






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






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






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






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






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






16. The __________ operator reclaims memory previously allocated by new.






17. The ________ of an identifier is the portion of the program in which the identifier can be used.






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






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






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






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






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






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






24. Default name of executable file






25. newline






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






27. Preprocessor directive syntax






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






29. The stream insertion operator






30. A function ________ enables a single function to be defined to perform a task on many different data types.






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






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






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






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


35. Executable version of program






36. Used for function calls and local variables






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






38. Used for dynamically allocated variables






39. If a member initializer is not provided for a member object of a class the object's __________ is called.






40. Whole numbers - no decimals and no commas included






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






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






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






44. Function ________ is used to produce random numbers.






45. A function is invoked with a ________.






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






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






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






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






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