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 storage-class specifiers are mutable - auto - ________ - extern and static.






2. A filestream variable that represents the default input source






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






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






5. int namespace include using return examples of ___________






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






7. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.






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






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






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






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






12. A function is invoked with a ________.






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






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






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






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






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


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






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






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






21. Operator with two operands






22. Header file that contains commonly performed mathematical functions






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






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






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






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






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






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






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






30. newline






31. All C++ Variables are_________.






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






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






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






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






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






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






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






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






40. Function ________ is used to produce random numbers.






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






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






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






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






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. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.






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






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






49. A variable declared outside any block or function is a ________ variable.






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