Where can local variables declared within a method’s body be used?

a. Only in that method between the line in which they were declared and the closing brace of that method.
b. Same as (a), but not within while or if statements.
c. Only within while or if statements within the method in which they were declared.
d. Anywhere within the class.


a. Only in that method between the line in which they were declared and the closing brace of that method.

Computer Science & Information Technology

You might also like to view...

Answer the following statements true (T) or false (F)

1. C++ permits you to overload the sizeof operator and the this pointer. 2. When you overload the << operator you must also overload the >> operator. 3. A public data member may be declared a friend of a private function. 4. A static member variable can be used when there are no objects of the class in existence. 5. You can overload the conditional operator to make it function as an unconditional operator.

Computer Science & Information Technology

If you don't enter a name for your new photo album, Google+ names it with ________

A) your username B) your username and time C) the current date and time D) the current date

Computer Science & Information Technology

With Bluetooth printing, the computer and printer need to be aligned with each other. 

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

Which of the following is atechnical description of a virus?

a. It is a harmful program that involves the use of Short Message Service to get personal details from victims. b. It is the act of fraudulently using email to try to get the recipient to reveal personal data. c. It is a piece of code that causes a computer to behave in an unexpected and usually undesirable manner. d. It is the abuse of email systems to send unsolicited email to large numbers of people.

Computer Science & Information Technology