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. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.






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






3. Most calculations are normally performed by ______ statements.






4. The process of placing the elements of an array in order is called ________ the array.






5. A function that calls itself either directly or indirectly - through another function) - is a ________ function.






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






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






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






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






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






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






12. Preprocessor directive syntax






13. int namespace include using return examples of ___________






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






15. Creates a copy of a string.






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






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






18. A function that calls itself






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






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






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






22. The _________ begins the body of every function and the _________ ends the body of every function.






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






24. The stream insertion operator






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






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






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






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






29. Type casting syntax






30. Naming convention for C++ programs






31. To explicitly indicate that a value is to be converted to another type






32. The ________ statement in a called function passes the value of an expression back to the calling function.






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






34. The sign you use for references






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






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






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






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






39. Used for dynamically allocated variables






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






41. The escape sequence ___ when output with cout and the stream insertion operator - causes the cursor to position to the beginning of the next line on the screen.






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






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






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






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






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






47. Every C++ statement ends with a(n) _________.






48. This manipulator causes the field to be left-justified with padding spaces printed to the right.






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






50. Classes can have relationships with other classes. These relationships are called ________.