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. A variable that is known only within the function in which it is defined is called a ________.






2. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.






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






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






5. Keyword public is a(n) _________






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






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






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






9. Header file that contains commonly performed mathematical functions






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






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






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






13. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.






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






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






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






17. The symbol for the binary scope resolution operator






18. Default name of executable file






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






20. A pointer is a variable that contains as its value the____________ of another variable.






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






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






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






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






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






26. The size & shape & color and weight of an object are considered






27. data types that refer to numbers with decimals






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






29. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .






30. * / % + -






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






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






33. tab






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






35. A program that finds and attaches to your program the indicated libraries for compilation






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






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






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






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






40. This manipulator is used to establish a field width for the value immediately following it.






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






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






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






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






45. A function is invoked with a ________.






46. A function that calls itself






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






48. A filestream variable that represents the default output device






49. = & | are examples of ____________.






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