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. Symbol that denotes an action to be performed






2. The sign you use for references






3. An expression that has operands with different data types






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






5. A filestream variable that represents the default output device






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






7. The sign you use for pointers






8. The ________ statement in a called function passes the value of an expression back to the calling function.






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






10. The stream insertion operator






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






12. The size & shape & color and weight of an object are considered






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






14. A human readable file that contains C++ program






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






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






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






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






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






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






21. An expression in which all operands have the same data type - result will have the same data type as operands






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






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






24. Header file that contains commonly performed mathematical functions






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






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


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






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






29. = & | are examples of ____________.






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






31. Naming convention for C++ programs






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. A variable that is known only within the function in which it is defined is called a ________.






34. Every C++ program begins execution at the function _________.






35. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')






36. The symbol for the binary scope resolution operator






37. All ______ must be declared before they are used.






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






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






40. Creates a copy of a string.






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






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






43. A set of values together with a set of operations






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






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






46. Type casting syntax






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






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






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






50. Function ________ is used to produce random numbers.