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 memory location with a name and data type and a value - its content (value) cannot be changed during program execution






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






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






4. Used for dynamically allocated variables






5. Grammar rules of the language; compiler will try to identify and locate syntax errors






6. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.






7. Used for function calls and local variables






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






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






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






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






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






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






14. Operator with only one operand






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






16. Nonexecutable statements that are included in a program to provide information about what the program does etc.






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






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






19. Whole numbers - no decimals and no commas included






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






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






22. Function ________ is used to produce random numbers.






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






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






25. A set of values together with a set of operations






26. Lists and tables of values can be stored in arrays or __________.






27. Preprocessor directive syntax






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






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






30. newline






31. Every C++ program begins execution at the function _________.






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






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






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






35. A filestream variable that represents the default input source






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






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






38. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.






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






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






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






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






43. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.






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






45. Header file that contains commonly performed mathematical functions






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






47. A recursive function typically has two components: One that provides a means for the recursion to terminate by testing for a(n) ________ case and one that expresses the problem as a recursive call for a slightly simpler problem than the original call






48. Executable version of program






49. Creates a copy of a string.






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