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. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.






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






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






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






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






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






7. Use 2 characters to represent one






8. Syntax for named constant declaration






9. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.






10. Keyword public is a(n) _________






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






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






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






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






15. A filestream variable that represents the default output device






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






17. Operator with only one operand






18. data types that refer to numbers with decimals






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






20. The symbol for the binary scope resolution operator






21. Function ________ is used to produce random numbers.






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






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






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






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






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






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






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






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






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






31. The modulus operator (%) can be used only with __________.






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






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






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






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






36. A variable that holds the address of another variable.






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






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






39. A filestream variable that represents the default input source






40. A __________ data member represents class-wide information.






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






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






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






44. You can declare default values for a function in the ____________________.






45. The stream extraction operator






46. Used for function calls and local variables






47. Type casting syntax






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






49. Most calculations are normally performed by ______ statements.






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