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






2. A filestream variable that represents the default output device






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






4. Repeating a set of instructions a specific number of times is called_________repetition.






5. The ________ program combines the output of the compiler with various library functions to produce an executable image.






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






7. Most calculations are normally performed by ______ statements.






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






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






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






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






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






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






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






15. Operator with two operands






16. To explicitly indicate that a value is to be converted to another type






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






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






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






20. The symbol for the binary scope resolution operator






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






22. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.






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






24. Naming convention for C++ programs






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






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






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






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






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






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






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






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






33. Function ________ is used to produce random numbers.






34. Used for dynamically allocated variables






35. Executable version of program






36. The elements of an array are related by the fact that they have the same name and ___________.






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






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






39. The sign you use for pointers






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






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






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






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






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






45. Sets floating-point values to a fixed decimal format






46. Header file that contains commonly performed mathematical functions






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






48. Associate an identifier with a memory location






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






50. An expression that has operands with different data types