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. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.






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






3. The stream insertion operator






4. Function ________ is used to produce random numbers.






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






6. Executable version of program






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






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






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






10. An expression that has operands with different data types






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






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






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






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






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






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






17. Used for function calls and local variables






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






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






20. newline






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






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






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






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






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






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






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






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






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






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






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






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






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






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






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






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






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






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






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






40. Whole numbers - no decimals and no commas included






41. Operator with two operands






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






43. If a member initializer is not provided for a member object of a class the object's __________ is called.






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






45. Syntax for named constant declaration






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






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






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. The stream extraction operator






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