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. A __________ should be used to declare the size of an array because it makes the program more scalable.






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






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






4. = & | are examples of ____________.






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






6. The stream insertion operator






7. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.






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






9. An expression that has operands with different data types






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






11. Keyword public is a(n) _________






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






13. Preprocessor directive syntax






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






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






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






17. In inheritance the ____________ is the class the receives the inherited members.






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






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






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






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






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






23. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.






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






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






26. data types that refer to numbers with decimals






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






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






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






30. Program components in C++ are called functions and ________.






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






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






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






34. A function ________ enables a single function to be defined to perform a task on many different data types.






35. tab






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






37. The symbol for the binary scope resolution operator






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






39. * / % + -






40. The ________ program combines the output of the compiler with various library functions to produce an executable image.






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






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






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






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






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






46. A filestream variable that represents the default input source






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






48. Function ________ is used to produce random numbers.






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






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