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. Class members specified as _________ are accessible anywhere an object of the class is in scope.






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






3. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.






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






5. The stream insertion operator






6. A function that calls itself






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






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






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






10. Objects have the property of ________although objects may know how to communicate with one another across well-defined interfaces - they normally are not allowed to know how other objects are implemented.






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






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






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






14. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution






15. The ________ enables access to a global variable with the same name as a variable in the current scope.






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






17. The ________ program transfers the executable image of a C++ program from disk to memory.






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






19. Executable version of program






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






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






22. Use 2 characters to represent one






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






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






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






26. Whole numbers - no decimals and no commas included






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






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






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






30. Class members are accessed via the ________ operator in conjunction with the name of an object (or reference to an object) of the class or via the arrow (->) operator in conjunction with a pointer to an object of the class.






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






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






33. A set of values together with a set of operations






34. Associate an identifier with a memory location






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






36. A filestream variable that represents the default input source






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






38. A filestream variable that represents the default output device






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






40. newline






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






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






43. Used for function calls and local variables






44. Function ________ is used to produce random numbers.






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






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






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






48. The modulus operator (%) can be used only with __________.






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






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