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






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






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






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






5. A________ allows the compiler to check the number & types and order of the arguments passed to a function.






6. Characters used to separate symbols or reserved words or identifiers and statements






7. Creates a copy of a string.






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






9. Allows the programmer to store a value in a variable






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






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






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






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






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






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






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






17. Symbol that denotes an action to be performed






18. A function is invoked with a ________.






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






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






21. A filestream variable that represents the default input source






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






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






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






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






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






27. directive A statement that starts with a # is called a ____________.






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






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






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






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






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






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


34. The process of analyzing and designing a system from an object-oriented point of view is called ________.






35. Operator with two operands






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






37. A function that calls itself






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






39. Most calculations are normally performed by ______ statements.






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






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






42. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.






43. Preprocessor directive syntax






44. An expression in which all operands have the same data type - result will have the same data type as operands






45. Operator with only one operand






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






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






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






49. Executable version of program






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