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. An operator that can only be used with int values. result will always be an int.






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






3. Identifier or expression that is part of the calculation to be performed






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






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






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






7. Used for function calls and local variables






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






9. Syntax for named constant declaration






10. The escape sequence ___ when output with cout and the stream insertion operator - causes the cursor to position to the beginning of the next line on the screen.






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






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






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






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






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






16. The three ways to return control from a called function to a caller are ________ - return expression and encounter.






17. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.






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






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






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






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






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






23. Most calculations are normally performed by ______ statements.






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






25. tab






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






27. All C++ Variables are_________.






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






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






30. A type of pointer that can point at objects of any data type.






31. newline






32. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.






33. A function is invoked with a ________.






34. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.






35. The sign you use for references






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






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






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






39. Class members specified as _________ are accessible anywhere an object of the class is in scope.






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






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






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






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






44. The stream insertion operator






45. Default name of executable file






46. data types that refer to numbers with decimals






47. Keyword public is a(n) _________






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






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






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