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






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






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






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






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






6. A function that calls itself






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






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






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






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






11. Preprocessor directive syntax






12. The only integer that can be assigned directly to a pointer is_____________.






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






14. Used for dynamically allocated variables






15. Whole numbers - no decimals and no commas included






16. * / % + -






17. For every opening brace in a C++ program there must be a ______________.






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






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






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






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






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






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






24. Executable version of program






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






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






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






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






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






30. = & | are examples of ____________.






31. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.






32. A pointer is a variable that contains as its value the____________ of another variable.






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






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






35. The stream extraction operator






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






37. A function is invoked with a ________.






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






39. The process of placing the elements of an array in order is called ________ the array.






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






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






42. The conditional operator. it evaluates a line of code and returns one thing if the condition is true and a different thing if the condition is false.






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






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






45. Class members specified as _________ are accessible anywhere an object of the class is in scope.






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






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






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






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






50. int namespace include using return examples of ___________