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. Two slash marks ( // ) indicate __________ of a comment






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






3. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.






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






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






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






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






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






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






10. Type casting syntax






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






12. Keyword public is a(n) _________






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






14. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution






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






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






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






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






19. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.






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






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






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






23. Use 2 characters to represent one






24. int namespace include using return examples of ___________






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






26. The symbol for the binary scope resolution operator






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






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






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






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






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






32. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.






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






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






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






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






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






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






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






40. Preprocessor directive syntax






41. Most calculations are normally performed by ______ statements.






42. All C++ Variables are_________.






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






44. For every opening brace in a C++ program there must be a ______________.






45. The sign you use for references






46. Naming convention for C++ programs






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






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






49. Function ________ is used to set the random number seed to randomize a program.






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