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. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.






2. A filestream variable that represents the default output device






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






4. The storage-class specifiers are mutable - auto - ________ - extern and static.






5. For a local variable in a function to retain its value between calls to the function it must be declared with the ________ storage-class specifier.






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






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






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






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






10. A ________ program executes before the compiler's translation phase begins.






11. Type casting syntax






12. Default name of executable file






13. The modulus operator (%) can be used only with __________.






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






15. C++ programs are normally typed into a computer using a(n) ________ program.






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






17. Smallest individual unit of a programming language - special symbols or word symbols or identifiers






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






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






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






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






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






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






24. The ________ program transfers the executable image of a C++ program from disk to memory.






25. An expression that has operands with different data types






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






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






28. Names of things that are used in a program - can apply to variables & constants and functions






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






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






31. = & | are examples of ____________.






32. Used for function calls and local variables






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






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






35. Whole numbers - no decimals and no commas included






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






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






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






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






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






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






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






43. The __________ operator reclaims memory previously allocated by new.






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






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






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






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






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






49. Manipulator that causes the insertion point (cursor) to move to the beginning of the next line


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