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. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.






2. This manipulator causes the field to be left-justified with padding spaces printed to the right.






3. Whole numbers - no decimals and no commas included






4. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.






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






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






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






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






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






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






11. Header file that contains commonly performed mathematical functions






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






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






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






15. Two slash marks ( // ) indicate __________ of a comment






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






17. The sign you use for pointers






18. You can declare default values for a function in the ____________________.






19. The symbol for the binary scope resolution operator






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






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






22. Creates a copy of a string.






23. Operator with only one operand






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






25. = & | are examples of ____________.






26. All C++ Variables are_________.






27. The size & shape & color and weight of an object are considered






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






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






30. Preprocessor directive syntax






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






32. Executable version of program






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






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






35. Used for function calls and local variables






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






37. Function ________ is used to set the random number seed to randomize a program.






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






39. A function is invoked with a ________.






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






41. Nonexecutable statements that are included in a program to provide information about what the program does etc.






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






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






44. A filestream variable that represents the default output device






45. data types that refer to numbers with decimals






46. An expression that has operands with different data types






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






48. The process of analyzing and designing a system from an object-oriented point of view is called ________.






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






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