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 __________ operator reclaims memory previously allocated by new.






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






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






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






5. Most calculations are normally performed by ______ statements.






6. To write data to a file you define an object of which one of the following






7. Whole numbers - no decimals and no commas included






8. = & | are examples of ____________.






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






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






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






12. In inheritance the ____________ is the class the receives the inherited members.






13. The conditional operator. it evaluates a line of code and returns one thing if the condition is true and a different thing if the condition is false.






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






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






16. This manipulator is used to establish a field width for the value immediately following it.






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






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






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






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






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






22. Use 2 characters to represent one






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






24. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.






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






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






27. A function that calls itself






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






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






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






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






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






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






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






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


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






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






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






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






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






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






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






43. Executable version of program






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






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






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






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






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






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






50. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.