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






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






4. Header file that contains commonly performed mathematical functions






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






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






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






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






9. A function is invoked with a ________.






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






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






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






13. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.






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






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






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






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






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






19. Member objects are constructed __________ their enclosing class object.






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






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






22. The _____ causes the contents of another file to be inserted into a program.






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






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






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






26. Associate an identifier with a memory location






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






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






29. A filestream variable that represents the default output device






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






31. The three values that can be used to initialize a pointer are 0 - __________ and an address.






32. Naming convention for C++ programs






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






34. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________






35. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.






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






37. An expression that has operands with different data types






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






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






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






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






42. Preprocessor directive syntax






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






44. Symbol that denotes an action to be performed






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






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






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






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






49. = & | are examples of ____________.






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