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 variable that is known only within the function in which it is defined is called a ________.






2. Initializers __________ must be used to initialize constant members of a class.






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






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 sign you use for references






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






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






8. Every C++ program begins execution at the function _________.






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






10. int namespace include using return examples of ___________






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






12. To allow file access in a program you must #include this header file.






13. A filestream variable that represents the default input source






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






15. An array that uses two subscripts is referred to as a(n) _________ array.






16. The sign you use for pointers






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






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






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






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






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






22. __________ can be used to assign an object of a class to another object of the same class.






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






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






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






26. Operator with two operands






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






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






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






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






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






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






33. Preprocessor directive syntax






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






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






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






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






38. A human readable file that contains C++ program






39. When you create a ___________________in the base class and then call it using an object the function will know to look in the inherited class for the specifics of that function.






40. When it is not known in advance how many times a set of statements will be repeated a _________value can be used to terminate the repetition.






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






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






43. The stream extraction operator






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






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






46. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.






47. data types that refer to numbers with decimals






48. A function that calls itself either directly or indirectly - through another function) - is a ________ function.






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






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