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 function that calls itself either directly or indirectly - through another function) - is a ________ function.






2. Creates a copy of a string.






3. Type casting syntax






4. All C++ Variables are_________.






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






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






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






8. The process of placing the elements of an array in order is called ________ the array.






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






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






11. A filestream variable that represents the default output device






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






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






14. newline






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






16. Operator with only one operand






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






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






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






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






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






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






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






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






25. To allow file access in a program you must #include this header file.






26. An array that uses two subscripts is referred to as a(n) _________ array.






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






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






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






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






31. Used for function calls and local variables






32. Default name of executable file






33. = & | are examples of ____________.






34. The sign you use for references






35. The sign you use for pointers






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






37. Grammar rules of the language; compiler will try to identify and locate syntax errors






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






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






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






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






42. * / % + -






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






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






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






46. A function is invoked with a ________.






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






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






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






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