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. Use 2 characters to represent one






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






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






4. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.






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






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






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






8. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.






9. OOD also takes advantage of ________ relationships where new classes of objects are derived by absorbing characteristics of existing classes - then adding unique characteristics of their own.






10. Classes can have relationships with other classes. These relationships are called ________.






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






12. The symbol for the binary scope resolution operator






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






14. = & | are examples of ____________.






15. tab






16. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.






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






18. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.






19. Default name of executable file






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






21. An expression that has operands with different data types






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






23. A sequence of operands and operators that describe a calculation to be performed






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






25. Most calculations are normally performed by ______ statements.






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






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






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






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






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






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






32. A __________ data member represents class-wide information.






33. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.






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






35. All C++ Variables are_________.






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






37. The sign you use for pointers






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






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






40. The process of analyzing and designing a system from an object-oriented point of view is called ________.






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






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






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






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






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






46. Operator with two operands






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






48. Every C++ statement ends with a(n) _________.






49. A filestream variable that represents the default input source






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