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. Manipulator that causes the insertion point (cursor) to move to the beginning of the next line

Warning: Invalid argument supplied for foreach() in /var/www/html/basicversity.com/show_quiz.php on line 183


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






3. Names of things that are used in a program - can apply to variables & constants and functions






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






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






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






7. Operator with two operands






8. All C++ Variables are_________.






9. A constant object must be __________; it cannot be modified after it is created.






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






11. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.






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






13. The stream extraction operator






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






15. Objects have the property of ________although objects may know how to communicate with one another across well-defined interfaces - they normally are not allowed to know how other objects are implemented.






16. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.






17. int namespace include using return examples of ___________






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






19. Use 2 characters to represent one






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






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






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






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






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






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






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






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






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






29. Words that are used for special purposes in a program






30. tab






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






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






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






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






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






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






37. An expression that has operands with different data types






38. * / % + -






39. A function that calls itself






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






41. Associate an identifier with a memory location






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






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






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






45. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.






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






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






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






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






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