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. Preprocessor directive syntax






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






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






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






5. Symbol that denotes an action to be performed






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






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






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






9. All C++ Variables are_________.






10. An expression that has operands with different data types






11. Operator with only one operand






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






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






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






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






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






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






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






19. Function ________ is used to produce random numbers.






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






21. int namespace include using return examples of ___________






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






23. A filestream variable that represents the default input source






24. Keyword public is a(n) _________






25. Most calculations are normally performed by ______ statements.






26. Initializers __________ must be used to initialize constant members of a class.






27. Characters used to separate symbols or reserved words or identifiers and statements






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






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






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






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






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






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






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






35. To explicitly indicate that a value is to be converted to another type






36. Syntax for named constant declaration






37. A C++ statement that makes a decision is ______.






38. The sign you use for pointers






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






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






41. The stream insertion operator






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






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






44. tab






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






46. The symbol for the binary scope resolution operator






47. Use 2 characters to represent one






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






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






50. A filestream variable that represents the default output device