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. Type casting syntax






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






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






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






5. A variable that holds the address of another variable.






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






7. A memory location with a name and data type - its content may be changed during program execution






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






9. A function is invoked with a ________.






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






11. A filestream variable that represents the default output device






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






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






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






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






16. The sign you use for references






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






18. The ________ statement in a called function passes the value of an expression back to the calling function.






19. Executable version of program






20. Associate an identifier with a memory location






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






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






23. Operator with only one operand






24. Whole numbers - no decimals and no commas included






25. Used for function calls and local variables






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






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






28. int namespace include using return examples of ___________






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






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






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






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






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






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






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






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






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






38. The ________ qualifier is used to declare read-only variables.






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






40. A function that calls itself






41. Naming convention for C++ programs






42. Header file that contains commonly performed mathematical functions






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






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






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






46. The _____ causes the contents of another file to be inserted into a program.






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






48. An expression that has operands with different data types






49. A filestream variable that represents the default input source






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