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 modulus operator (%) can be used only with __________.






2. * / % + -






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






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






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






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






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






8. newline






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






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






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






12. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .






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






14. Characters used to separate symbols or reserved words or identifiers and statements






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






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






17. The ________ program combines the output of the compiler with various library functions to produce an executable image.






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






19. Syntax for named constant declaration






20. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.






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






22. Member objects are constructed __________ their enclosing class object.






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






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






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






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






27. data types that refer to numbers with decimals






28. The stream extraction operator






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






30. A member function should be declared static if it does not access __________ class members.






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






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






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


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






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






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






37. If a member initializer is not provided for a member object of a class the object's __________ is called.






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






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






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






41. tab






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






43. Creates a copy of a string.






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






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






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






47. Used for dynamically allocated variables






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






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






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