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. For every opening brace in a C++ program there must be a ______________.






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






3. * / % + -






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






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






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






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






8. Type casting syntax






9. The idea that you can call the same function and the output will depend on the type of object you're using.






10. The stream insertion operator






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






12. The sign you use for pointers






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






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






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






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






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






18. Associate an identifier with a memory location






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






20. Use 2 characters to represent one






21. Keyword public is a(n) _________






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






23. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time






24. A member function should be declared static if it does not access __________ class members.






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






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






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






28. Symbol that denotes an action to be performed






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






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






31. Executable version of program






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






33. A function that calls itself either directly or indirectly - through another function) - is a ________ function.






34. A constant object must be __________; it cannot be modified after it is created.






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






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






37. data types that refer to numbers with decimals






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






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






40. Compares two strings and returns 0 if they are equal.






41. A filestream variable that represents the default output device






42. A function is invoked with a ________.






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






44. All ______ must be declared before they are used.






45. Most calculations are normally performed by ______ statements.






46. Program components in C++ are called functions and ________.






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






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






49. The _________ begins the body of every function and the _________ ends the body of every function.






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