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. To write data to a file you define an object of which one of the following






2. Allows the programmer to store a value in a variable






3. A __________ data member represents class-wide information.






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






5. Executable version of program






6. A filestream variable that represents the default input source






7. Grammar rules of the language; compiler will try to identify and locate syntax errors






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






9. Lists and tables of values can be stored in arrays or __________.






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






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






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






13. Preprocessor directive syntax






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






15. All C++ Variables are_________.






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. Use 2 characters to represent one






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






19. Default name of executable file






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






21. A constant object must be __________; it cannot be modified after it is created.






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






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






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






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






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






27. The ________ of an identifier is the portion of the program in which the identifier can be used.






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






29. Whole numbers - no decimals and no commas included






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






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






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






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. The ________ qualifier is used to declare read-only variables.






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






36. The sign you use for pointers






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






38. The symbol for the binary scope resolution operator






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






40. * / % + -






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






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






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






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






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






46. The process of determining if an array contains a particular key value is called _________ the array.






47. data types that refer to numbers with decimals






48. A ________ program executes before the compiler's translation phase begins.






49. A function is invoked with a ________.






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







Sorry!:) No result found.

Can you answer 50 questions in 15 minutes?


Let me suggest you:



Major Subjects



Tests & Exams


AP
CLEP
DSST
GRE
SAT
GMAT

Most popular tests