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. In inheritance the ____________ is the class the receives the inherited members.






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






3. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.






4. Type casting syntax






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






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






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






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






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






10. A program that finds and attaches to your program the indicated libraries for compilation






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






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






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






14. int namespace include using return examples of ___________






15. Most calculations are normally performed by ______ statements.






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






17. A sequence of operands and operators that describe a calculation to be performed






18. The symbol for the binary scope resolution operator






19. Syntax for named constant declaration






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






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






22. A variable that holds the address of another variable.






23. Smallest individual unit of a programming language - special symbols or word symbols or identifiers






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






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






26. The sign you use for references






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






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






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






30. The idea that you can call the same function and the output will depend on the type of object you're using.






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






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






33. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.






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






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






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






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






38. Naming convention for C++ programs






39. A function is invoked with a ________.






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






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


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






43. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.






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






45. Preprocessor directive syntax






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






47. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.






48. Use 2 characters to represent one






49. A variable that is known only within the function in which it is defined is called a ________.






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