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. Function ________ is used to produce random numbers.






2. A filestream variable that represents the default output device






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






4. An operator that can only be used with int values. result will always be an int.






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






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






7. A function is invoked with a ________.






8. data types that refer to numbers with decimals






9. A file must be ________ before data can be written to or read from it.






10. Executable version of program






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






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






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






14. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.






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






16. You can declare default values for a function in the ____________________.






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






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






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






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






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






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






23. Keyword public is a(n) _________






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






25. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.






26. A variable declared outside any block or function is a ________ variable.






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






28. All C++ Variables are_________.






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






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






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






32. The sign you use for pointers






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






34. You must have a ___________ for every variable you intend to use in a program






35. A filestream variable that represents the default input source






36. tab






37. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors






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






39. Used for function calls and local variables






40. A constant object must be __________; it cannot be modified after it is created.






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






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






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






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






45. * / % + -






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






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






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






49. Default name of executable file






50. Symbol that denotes an action to be performed