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 program that finds and attaches to your program the indicated libraries for compilation






2. All C++ Variables are_________.






3. Executable version of program






4. Preprocessor directive syntax






5. data types that refer to numbers with decimals






6. Syntax for named constant declaration






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






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






9. A sequence of operands and operators that describe a calculation to be performed






10. Associate an identifier with a memory location






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






12. Keyword public is a(n) _________






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






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






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






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






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






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






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






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






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






22. The ________ program combines the output of the compiler with various library functions to produce an executable image.






23. A file must be ________ before data can be written to or read from it.






24. The _____ causes the contents of another file to be inserted into a program.






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






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






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






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






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






30. tab






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






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






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






34. A function is invoked with a ________.






35. A filestream variable that represents the default input source






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






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






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






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






40. OOD also takes advantage of ________ relationships where new classes of objects are derived by absorbing characteristics of existing classes - then adding unique characteristics of their own.






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






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






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






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






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






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






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






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






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






50. Allows the programmer to store a value in a variable