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 sign you use for references






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






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






4. Operator with two operands






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






6. Operator with only one operand






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






8. The sign you use for pointers






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






10. An expression that has operands with different data types






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






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






13. Syntax for named constant declaration






14. * / % + -






15. When a value of one data type is implicitly (automatically) changed to another data type






16. Default name of executable file






17. A function that calls itself either directly or indirectly - through another function) - is a ________ function.






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






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






20. Header file that contains commonly performed mathematical functions






21. Initializers __________ must be used to initialize constant members of a class.






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






23. data types that refer to numbers with decimals






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






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






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






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






28. The storage-class specifiers are mutable - auto - ________ - extern and static.






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






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






31. tab






32. All C++ Variables are_________.






33. Type casting syntax






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






35. The three values that can be used to initialize a pointer are 0 - __________ and an address.






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






37. The stream extraction operator






38. The ________ qualifier is used to declare read-only variables.






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






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






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






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






43. Associate an identifier with a memory location






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






45. int namespace include using return examples of ___________






46. A human readable file that contains C++ program






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






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






49. Function ________ is used to produce random numbers.






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