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. Message displayed to the screen asking user for input; generated with an output statement






2. Creates a copy of a string.






3. A filestream variable that represents the default input source






4. Operator with only one operand






5. Type casting syntax






6. Two slash marks ( // ) indicate __________ of a comment






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






8. int namespace include using return examples of ___________






9. Repeating a set of instructions a specific number of times is called_________repetition.






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






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






12. The address-of operator. it is used to assign pointers and to print the address of variables.






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






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






15. The conditional operator. it evaluates a line of code and returns one thing if the condition is true and a different thing if the condition is false.






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






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






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






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






20. Initializers __________ must be used to initialize constant members of a class.






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






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






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






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






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






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






27. An array that uses two subscripts is referred to as a(n) _________ array.






28. The sign you use for pointers






29. A recursive function typically has two components: One that provides a means for the recursion to terminate by testing for a(n) ________ case and one that expresses the problem as a recursive call for a slightly simpler problem than the original call






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






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






32. A function ________ enables a single function to be defined to perform a task on many different data types.






33. In inheritance the ____________ is the class the receives the inherited members.






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






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






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






37. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.






38. Associate an identifier with a memory location






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






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






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






42. A variable that is known only within the function in which it is defined is called a ________.






43. A function that calls itself






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






45. The storage-class specifiers are mutable - auto - ________ - extern and static.






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






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






48. The symbol for the binary scope resolution operator






49. A filestream variable that represents the default output device






50. To allow file access in a program you must #include this header file.