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. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________






2. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')






3. Every C++ statement ends with a(n) _________.






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






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






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






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






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






9. int namespace include using return examples of ___________






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






11. Symbol that denotes an action to be performed






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






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






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






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






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






17. The ________ of an identifier is the portion of the program in which the identifier can be used.






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






19. A filestream variable that represents the default input source






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






21. = & | are examples of ____________.






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






23. Used for dynamically allocated variables






24. The ________ qualifier is used to declare read-only variables.






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






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






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






28. Function ________ is used to produce random numbers.






29. The number used to refer to a particular element of an array is called its ________.






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






31. This is used to mark the end of a complete C++ programming statement.






32. The stream insertion operator






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






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






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






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






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






38. * / % + -






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






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






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






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






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






44. Header file that contains commonly performed mathematical functions






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






46. Most calculations are normally performed by ______ statements.






47. Naming convention for C++ programs






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






49. Use 2 characters to represent one






50. The stream extraction operator