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. The process of placing the elements of an array in order is called ________ the array.






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






3. Identifier or expression that is part of the calculation to be performed






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






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






6. Preprocessor directive syntax






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






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






9. This manipulator is used to establish a field width for the value immediately following it.






10. Function ________ is used to produce random numbers.






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






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






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






14. Associate an identifier with a memory location






15. = & | are examples of ____________.






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






17. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.






18. Two slash marks ( // ) indicate __________ of a comment






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






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






21. A pointer is a variable that contains as its value the____________ of another variable.






22. Use 2 characters to represent one






23. data types that refer to numbers with decimals






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






25. Used to qualify hidden names so that they can be used.






26. Used for function calls and local variables






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






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






29. The only integer that can be assigned directly to a pointer is_____________.






30. A ________ program executes before the compiler's translation phase begins.






31. The elements of an array are related by the fact that they have the same name and ___________.






32. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time






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






34. Operator with two operands






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






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






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






38. To write data to a file you define an object of which one of the following






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






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






41. The sign you use for pointers






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






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






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






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






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






47. int namespace include using return examples of ___________






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






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






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