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. Repeating a set of instructions a specific number of times is called_________repetition.






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. Compares two strings and returns 0 if they are equal.






4. A filestream variable that represents the default input source






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






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






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






8. Most calculations are normally performed by ______ statements.






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






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






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






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






13. A function is invoked with a ________.






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






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






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






17. Creates a copy of a string.






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






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






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






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






22. The ________ statement in a called function passes the value of an expression back to the calling function.






23. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.






24. The sign you use for references






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






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






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






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






29. C++ programs are normally typed into a computer using a(n) ________ program.






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






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






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






33. The sign you use for pointers






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






35. Characters used to separate symbols or reserved words or identifiers and statements






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






37. To write data to a file you define an object of which one of the following






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






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






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






41. Operator with two operands






42. Naming convention for C++ programs






43. Function ________ is used to produce random numbers.






44. Default name of executable file






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






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






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






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






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






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