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 ________ of an identifier is the portion of the program in which the identifier can be used.






2. The symbol for the binary scope resolution operator






3. Nonexecutable statements that are included in a program to provide information about what the program does etc.






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






5. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.






6. The ________ qualifier is used to declare read-only variables.






7. Syntax for named constant declaration






8. Use 2 characters to represent one






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






10. A function that calls itself either directly or indirectly - through another function) - is a ________ function.






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






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






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






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






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






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






17. Header file that contains commonly performed mathematical functions






18. Type casting syntax






19. A function that calls itself






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






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






22. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.






23. The sign you use for pointers






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






25. Executable version of program






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






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






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






29. All C++ Variables are_________.






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






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






32. Operator with two operands






33. Used for dynamically allocated variables






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






35. Preprocessor directive syntax






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






37. Function ________ is used to produce random numbers.






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






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






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






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






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






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






44. The stream insertion operator






45. Symbol that denotes an action to be performed






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






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






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






49. A filestream variable that represents the default output device






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