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. Syntax for named constant declaration






2. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.






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






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






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






6. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.






7. A function that calls itself






8. = & | are examples of ____________.






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






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






11. The stream extraction operator






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






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






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






15. Operator with only one operand






16. The symbol for the binary scope resolution operator






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






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






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






20. If a member initializer is not provided for a member object of a class the object's __________ is called.






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






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






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






24. * / % + -






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






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






27. A memory location with a name and data type - its content may be changed during program execution






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






29. When you create a ___________________in the base class and then call it using an object the function will know to look in the inherited class for the specifics of that function.






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






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






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






33. A type of pointer that can point at objects of any data type.






34. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.






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






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






37. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.






38. data types that refer to numbers with decimals






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






40. The escape sequence ___ when output with cout and the stream insertion operator - causes the cursor to position to the beginning of the next line on the screen.






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






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






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






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






45. Class members are accessed via the ________ operator in conjunction with the name of an object (or reference to an object) of the class or via the arrow (->) operator in conjunction with a pointer to an object of the class.






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






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






48. Creates a copy of a string.






49. Whole numbers - no decimals and no commas included






50. The _____ causes the contents of another file to be inserted into a program.