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. The sign you use for references






2. A function is invoked with a ________.






3. Associate an identifier with a memory location






4. data types that refer to numbers with decimals






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






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






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






8. The three values that can be used to initialize a pointer are 0 - __________ and an address.






9. Preprocessor directive syntax






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






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






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






13. In inheritance the ____________ is the class that supplies the inherited members.






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






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






16. Whole numbers - no decimals and no commas included






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






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






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






20. Operator with only one operand






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






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






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






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






25. This is used to mark the end of a complete C++ programming statement.






26. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors






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






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






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






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






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






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






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






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






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






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






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






38. Creates a copy of a string.






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






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






41. The stream insertion operator






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






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






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






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






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






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






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






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






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