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. A program that finds and attaches to your program the indicated libraries for compilation






2. Whole numbers - no decimals and no commas included






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






4. OOD also takes advantage of ________ relationships where new classes of objects are derived by absorbing characteristics of existing classes - then adding unique characteristics of their own.






5. int namespace include using return examples of ___________






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






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






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






9. Two slash marks ( // ) indicate __________ of a comment






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






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






12. Use 2 characters to represent one






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. Nonexecutable statements that are included in a program to provide information about what the program does etc.






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






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






17. To write data to a file you define an object of which one of the following






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


19. Keyword public is a(n) _________






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






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






22. Type casting syntax






23. All C++ Variables are_________.






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






25. Used to qualify hidden names so that they can be used.






26. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.






27. Forces the computer to display decimal point and trailing zeroes






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






29. The sign you use for pointers






30. The process of determining if an array contains a particular key value is called _________ the array.






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






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 member function should be declared static if it does not access __________ class members.






34. newline






35. * / % + -






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






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






38. The stream insertion operator






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






40. Used for dynamically allocated variables






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






42. Associate an identifier with a memory location






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






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






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






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






47. data types that refer to numbers with decimals






48. A filestream variable that represents the default output device






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






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