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






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






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






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






5. Default name of executable file






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






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






8. An expression that has operands with different data types






9. A memory location with a name and data type - its content may be changed during program execution






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






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






12. The symbol for the binary scope resolution operator






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






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






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






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






17. Used for dynamically allocated variables






18. A function is invoked with a ________.






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






20. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.






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






22. tab






23. A variable that holds the address of another variable.






24. To allow file access in a program you must #include this header file.






25. Header file that contains commonly performed mathematical functions






26. Used for function calls and local variables






27. * / % + -






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






29. A filestream variable that represents the default output device






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






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






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






33. Operator with two operands






34. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time






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






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






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






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






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






40. The sign you use for pointers






41. Symbol that denotes an action to be performed






42. OOD also takes advantage of ________ relationships where new classes of objects are derived by absorbing characteristics of existing classes - then adding unique characteristics of their own.






43. The idea that you can call the same function and the output will depend on the type of object you're using.






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






45. Whole numbers - no decimals and no commas included






46. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.






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






48. Smallest individual unit of a programming language - special symbols or word symbols or identifiers






49. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.






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