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. The ________ qualifier is used to declare read-only variables.






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






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






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






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






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






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






9. data types that refer to numbers with decimals






10. Syntax for named constant declaration






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






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






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. Class members specified as _________ are accessible anywhere an object of the class is in scope.






15. The symbol for the binary scope resolution operator






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






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






18. An operator that can only be used with int values. result will always be an int.






19. The three values that can be used to initialize a pointer are 0 - __________ and an address.






20. This manipulator causes the field to be left-justified with padding spaces printed to the right.






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






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






23. For a local variable in a function to retain its value between calls to the function it must be declared with the ________ storage-class specifier.






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






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






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






27. Creates a copy of a string.






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






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






30. A function is invoked with a ________.






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






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






33. The sign you use for pointers






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






35. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.






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






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






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






39. The elements of an array are related by the fact that they have the same name and ___________.






40. Keyword public is a(n) _________






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






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






43. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________






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






45. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.






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






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






48. Symbol that denotes an action to be performed






49. int namespace include using return examples of ___________






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