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 manipulator causes the field to be left-justified with padding spaces printed to the right.






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






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






4. A filestream variable that represents the default output device






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






6. The symbol for the binary scope resolution operator






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






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






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






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






11. A function that calls itself






12. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.






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






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






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






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






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






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






19. The sign you use for pointers






20. The ________ enables access to a global variable with the same name as a variable in the current scope.






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






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






23. An operator that can only be used with int values. result will always be an int.






24. Naming convention for C++ programs






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






26. Used for function calls and local variables






27. Syntax for named constant declaration






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






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






30. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.






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






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






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






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






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






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






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






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






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






40. Associate an identifier with a memory location






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






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






43. All C++ Variables are_________.






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






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






46. Header file that contains commonly performed mathematical functions






47. Creates a copy of a string.






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






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






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