What is i after the following for loop?
int y = 0;
for (int i = 0; i < 10; ++i) {
y += i;
}
a. 9
b. 10
c. 11
d. undefined
d The scope for i is inside the loop. After the loop, i is not defined. So, the correct answer is D.
You might also like to view...
When you define a C++ class so that the result is an ADT, which of the following remarks about whether to make a member variable or function public or private are correct?
a. Make them all public. It simplifies life and makes things more efficient to be able access members anywhere. b. Don’t make member variables public. c. Make all member functions public. d. There are some member functions that shouldn’t be public, but most should be public.
There are three basic categories of information that an Internet service provider can collect regarding its customers. Which of the following is not one of those categories?
a. Basic Subscriber Information b. Transactional History c. Financial Profile d. Customer generated content
The logical comparison operator used for "not equals" is >=.
Answer the following statement true (T) or false (F)
Memory modules have a(n) _______ that prevents you from inserting the module into the expansion slot the wrong way
Fill in the blank(s) with correct word