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. Most calculations are normally performed by ______ statements.






2. A function that calls itself






3. int namespace include using return examples of ___________






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






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






6. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.






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






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






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






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






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






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






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






14. A function is invoked with a ________.






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






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






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






18. = & | are examples of ____________.






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






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






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






22. This is used to mark the end of a complete C++ programming statement.






23. The _________ begins the body of every function and the _________ ends the body of every function.






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






25. Sets floating-point values to a fixed decimal format






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






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






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






29. data types that refer to numbers with decimals






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






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






32. Function ________ is used to produce random numbers.






33. Header file that contains commonly performed mathematical functions






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






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






36. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution






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






38. __________ can be used to assign an object of a class to another object of the same class.






39. Class members are accessed via the ________ operator in conjunction with the name of an object (or reference to an object) of the class or via the arrow (->) operator in conjunction with a pointer to an object of the class.






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. Classes can have relationships with other classes. These relationships are called ________.






42. A sequence of operands and operators that describe a calculation to be performed






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






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






45. Executable version of program






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






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






48. An expression that has operands with different data types






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






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