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






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






3. Used for dynamically allocated variables






4. A filestream variable that represents the default output device






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






6. The sign you use for references






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






8. Type casting syntax






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






10. A constant object must be __________; it cannot be modified after it is created.






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






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






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






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






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






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






17. Function ________ is used to produce random numbers.






18. Symbol that denotes an action to be performed






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






20. Use 2 characters to represent one






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






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






23. Whole numbers - no decimals and no commas included






24. Preprocessor directive syntax






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






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






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






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






29. The idea that you can call the same function and the output will depend on the type of object you're using.






30. A member function should be declared static if it does not access __________ class members.






31. A function that calls itself






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






33. The storage-class specifiers are mutable - auto - ________ - extern and static.






34. Header file that contains commonly performed mathematical functions






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






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






37. A variable declared outside any block or function is a ________ variable.






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






39. Used for function calls and local variables






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






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






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






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






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






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






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






47. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.






48. In inheritance the ____________ is the class the receives the inherited members.






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






50. Naming convention for C++ programs