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 modulus operator (%) can be used only with __________.






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






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






4. A variable that is known only within the function in which it is defined is called a ________.






5. Naming convention for C++ programs






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






7. When you create a ___________________in the base class and then call it using an object the function will know to look in the inherited class for the specifics of that function.






8. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.






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






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






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






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






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






14. The symbol for the binary scope resolution operator






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






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






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






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






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






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






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






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






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






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






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






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






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






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






29. The ________ enables access to a global variable with the same name as a variable in the current scope.






30. Use 2 characters to represent one






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






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






33. data types that refer to numbers with decimals






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






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






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






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


38. Function ________ is used to produce random numbers.






39. For a local variable in a function to retain its value between calls to the function it must be declared with the ________ storage-class specifier.






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






41. Whole numbers - no decimals and no commas included






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






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






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






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






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






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






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






49. A filestream variable that represents the default input source






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