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. The size & shape & color and weight of an object are considered






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






3. A function that calls itself






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






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






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






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






8. Function ________ is used to produce random numbers.






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






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






11. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.






12. The ________ program transfers the executable image of a C++ program from disk to memory.






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






14. = & | are examples of ____________.






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






16. Nonexecutable statements that are included in a program to provide information about what the program does etc.






17. tab






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






19. Operator with two operands






20. Operator with only one operand






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






22. * / % + -






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






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






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






26. OOD also takes advantage of ________ relationships where new classes of objects are derived by absorbing characteristics of existing classes - then adding unique characteristics of their own.






27. The process of determining if an array contains a particular key value is called _________ the array.






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






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






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






31. A function that can be used to read character data including whitespace






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






33. A __________ should be used to declare the size of an array because it makes the program more scalable.






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






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






36. Causes the program to immediately goes back to the top of the loop. the remainder of the statements in the loop are ignored for this current iteration.






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






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






39. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.






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






41. Header file that contains commonly performed mathematical functions






42. A variable declared outside any block or function is a ________ variable.






43. A __________ data member represents class-wide information.






44. data types that refer to numbers with decimals






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






46. Syntax for named constant declaration






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






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






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






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