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. To write data to a file you define an object of which one of the following






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






4. The symbol for the binary scope resolution operator






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






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






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






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






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






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






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






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






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






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






15. A filestream variable that represents the default output device






16. The __________ operator reclaims memory previously allocated by new.






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






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






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






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






21. An expression that has operands with different data types






22. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.






23. A function that calls itself






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






25. The process of placing the elements of an array in order is called ________ the array.






26. int namespace include using return examples of ___________






27. Header file that contains commonly performed mathematical functions






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






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






30. Use 2 characters to represent one






31. data types that refer to numbers with decimals






32. A filestream variable that represents the default input source






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






34. Type casting syntax






35. Function ________ is used to set the random number seed to randomize a program.






36. Operator with two operands






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






38. The sign you use for references






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






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






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






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






43. Used for function calls and local variables






44. The sign you use for pointers






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






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






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






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






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






50. All C++ Variables are_________.