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. The address-of operator. it is used to assign pointers and to print the address of variables.






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






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






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






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






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






7. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.






8. A function is invoked with a ________.






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






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






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






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






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






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






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






16. The escape sequence ___ when output with cout and the stream insertion operator - causes the cursor to position to the beginning of the next line on the screen.






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






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






19. The keyword ________ is used in a function header to indicate that a function does not return a value or to indicate that a function contains no parameters.






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






21. Used for dynamically allocated variables






22. newline






23. Symbol that denotes an action to be performed






24. Naming convention for C++ programs






25. These are data items whose values do not change while the program is running






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






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






28. Header file that contains commonly performed mathematical functions






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






30. This manipulator is used to establish a field width for the value immediately following it.






31. A filestream variable that represents the default output device






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






33. Manipulator that causes the insertion point (cursor) to move to the beginning of the next line

Warning: Invalid argument supplied for foreach() in /var/www/html/basicversity.com/show_quiz.php on line 183


34. data types that refer to numbers with decimals






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






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






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






38. Preprocessor directive syntax






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






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






41. A __________ should be used to declare the size of an array because it makes the program more scalable.






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






43. In inheritance the ____________ is the class that supplies the inherited members.






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






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






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






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






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






49. Executable version of program






50. A recursive function typically has two components: One that provides a means for the recursion to terminate by testing for a(n) ________ case and one that expresses the problem as a recursive call for a slightly simpler problem than the original call