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. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time






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






3. Whole numbers - no decimals and no commas included






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






5. An expression that has operands with different data types






6. Symbol that denotes an action to be performed






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






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






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






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






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






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






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






14. = & | are examples of ____________.






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






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






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






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






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






20. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.






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






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






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






24. Associate an identifier with a memory location






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






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






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






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






29. A set of values together with a set of operations






30. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors






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






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






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






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






35. Nonexecutable statements that are included in a program to provide information about what the program does etc.






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






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






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






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






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






41. A ________ program executes before the compiler's translation phase begins.






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






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






44. A C++ statement that makes a decision is ______.






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






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






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






48. Use 2 characters to represent one






49. The sign you use for pointers






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






Can you answer 50 questions in 15 minutes?



Let me suggest you:



Major Subjects



Tests & Exams


AP
CLEP
DSST
GRE
SAT
GMAT

Most popular tests