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. All C++ Variables are_________.






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






3. Default name of executable file






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






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






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






7. Keyword public is a(n) _________






8. Syntax for named constant declaration






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






10. A function is invoked with a ________.






11. Grammar rules of the language; compiler will try to identify and locate syntax errors






12. Used for dynamically allocated variables






13. Allows the programmer to store a value in a variable






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






15. The symbol for the binary scope resolution operator






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






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






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






19. If a member initializer is not provided for a member object of a class the object's __________ is called.






20. Function ________ is used to produce random numbers.






21. * / % + -






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






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






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






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






26. The sign you use for pointers






27. Nonexecutable statements that are included in a program to provide information about what the program does etc.






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






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






30. A filestream variable that represents the default output device






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






32. The process of placing the elements of an array in order is called ________ the array.






33. tab






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






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






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






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






38. The size & shape & color and weight of an object are considered






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






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






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






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






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






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






45. Most calculations are normally performed by ______ statements.






46. Operator with only one operand






47. The ________ program combines the output of the compiler with various library functions to produce an executable image.






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






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






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