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. Operator with only one operand






2. Header file that contains commonly performed mathematical functions






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






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






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






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






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






8. All C++ Variables are_________.






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






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






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






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






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






14. Use 2 characters to represent one






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






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






17. Words that are used for special purposes in a program






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






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






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






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






22. A program that finds and attaches to your program the indicated libraries for compilation






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






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






25. A sequence of operands and operators that describe a calculation to be performed






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






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






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






29. Characters used to separate symbols or reserved words or identifiers and statements






30. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________






31. The stream extraction operator






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






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






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






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






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






37. Creates a copy of a string.






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






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






40. Naming convention for C++ programs






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






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






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






44. Associate an identifier with a memory location






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






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






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






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






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






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