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 member function should be declared static if it does not access __________ class members.






2. Used for function calls and local variables






3. int namespace include using return examples of ___________






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






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






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






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. Most calculations are normally performed by ______ statements.






9. The sign you use for references






10. Default name of executable file






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






12. Preprocessor directive syntax






13. data types that refer to numbers with decimals






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






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






16. Associate an identifier with a memory location






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






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






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






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






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






22. Executable version of program






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






24. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution






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






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






27. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .






28. Creates a copy of a string.






29. tab






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






31. Header file that contains commonly performed mathematical functions






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






33. Function ________ is used to produce random numbers.






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






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






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






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






38. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.






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






40. = & | are examples of ____________.






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






42. When you create a ___________________in the base class and then call it using an object the function will know to look in the inherited class for the specifics of that function.






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






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






45. Keyword public is a(n) _________






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






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






48. Class members are accessed via the ________ operator in conjunction with the name of an object (or reference to an object) of the class or via the arrow (->) operator in conjunction with a pointer to an object of the class.






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






50. Compares two strings and returns 0 if they are equal.