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 constant object must be __________; it cannot be modified after it is created.






2. Causes the program to immediately goes back to the top of the loop. the remainder of the statements in the loop are ignored for this current iteration.






3. A filestream variable that represents the default input source






4. Operator with two operands






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






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






7. int namespace include using return examples of ___________






8. A ________ program executes before the compiler's translation phase begins.






9. Function ________ is used to set the random number seed to randomize a program.






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






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






12. Symbol that denotes an action to be performed






13. The stream insertion operator






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






15. Header file that contains commonly performed mathematical functions






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






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






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






19. A function is invoked with a ________.






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






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






22. Type casting syntax






23. The three values that can be used to initialize a pointer are 0 - __________ and an address.






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






25. data types that refer to numbers with decimals






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






27. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.






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






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






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






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






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






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






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






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






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






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






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






39. Class members specified as _________ are accessible only to member functions of the class and friends of the class.






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






41. A function that calls itself






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






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






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






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






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






47. Used for dynamically allocated variables






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






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






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