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. Used for dynamically allocated variables






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






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






4. newline






5. Operator with only one operand






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






7. Member objects are constructed __________ their enclosing class object.






8. Whole numbers - no decimals and no commas included






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






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






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






12. tab






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






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






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






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






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






18. Class members specified as _________ are accessible anywhere an object of the class is in scope.






19. This is used to mark the end of a complete C++ programming statement.






20. Associate an identifier with a memory location






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. Nonexecutable statements that are included in a program to provide information about what the program does etc.






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






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






25. The process of analyzing and designing a system from an object-oriented point of view is called ________.






26. Message displayed to the screen asking user for input; generated with an output statement






27. Function ________ is used to produce random numbers.






28. The symbol for the binary scope resolution operator






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






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






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






32. * / % + -






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






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






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






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






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






38. The three ways to return control from a called function to a caller are ________ - return expression and encounter.






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






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






41. Returns the length of a string excluding the null terminator.






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






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






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






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






46. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.






47. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.






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






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






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