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






2. When a value of one data type is implicitly (automatically) changed to another data type






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






4. Operator with two operands






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






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


7. The _________ begins the body of every function and the _________ ends the body of every function.






8. An expression that has operands with different data types






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






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






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






12. The sign you use for pointers






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






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






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






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






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






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






19. Creates a copy of a string.






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






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






22. Type casting syntax






23. A filestream variable that represents the default input source






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






25. Header file that contains commonly performed mathematical functions






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






27. Lists and tables of values can be stored in arrays or __________.






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






29. Use 2 characters to represent one






30. A __________ data member represents class-wide information.






31. Executable version of program






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






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






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






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






36. directive A statement that starts with a # is called a ____________.






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






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






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






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






41. Default name of executable file






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






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






44. newline






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






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






47. Most calculations are normally performed by ______ statements.






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






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






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