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. Names of things that are used in a program - can apply to variables & constants and functions






2. Associate an identifier with a memory location






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






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






5. For a local variable in a function to retain its value between calls to the function it must be declared with the ________ storage-class specifier.






6. tab






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






8. The keyword ________ is used in a function header to indicate that a function does not return a value or to indicate that a function contains no parameters.






9. A________ allows the compiler to check the number & types and order of the arguments passed to a function.






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






11. Header file that contains commonly performed mathematical functions






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






13. Whole numbers - no decimals and no commas included






14. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.






15. A filestream variable that represents the default output device






16. All C++ Variables are_________.






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






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






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






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






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






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






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






24. All ______ must be declared before they are used.






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






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






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






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






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






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






31. A file must be ________ before data can be written to or read from it.






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






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






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






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






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






37. The sign you use for pointers






38. The stream extraction operator






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






40. Syntax for named constant declaration






41. Naming convention for C++ programs






42. Type casting syntax






43. The address-of operator. it is used to assign pointers and to print the address of variables.






44. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.






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






46. For every opening brace in a C++ program there must be a ______________.






47. data types that refer to numbers with decimals






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






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






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