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


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






3. Preprocessor directive syntax






4. Operator with only one operand






5. A pointer is a variable that contains as its value the____________ of another variable.






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






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






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






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






10. Forces the computer to display decimal point and trailing zeroes






11. Creates a copy of a string.






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






13. Every C++ program begins execution at the function _________.






14. Type casting syntax






15. Function ________ is used to produce random numbers.






16. The stream insertion operator






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






18. data types that refer to numbers with decimals






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






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






21. Used to qualify hidden names so that they can be used.






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






23. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution






24. The sign you use for pointers






25. An expression that has operands with different data types






26. The stream extraction operator






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






28. A __________ data member represents class-wide information.






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






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






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






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






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






34. Keyword public is a(n) _________






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






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






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






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






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






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






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






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






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






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






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






46. int namespace include using return examples of ___________






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






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






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






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