How long does this loop run:
for(int x=0; x=3; x++)
a) Never
b) Three times
c) Forever
Answers were Sorted based on User's Feedback
Answer / g m rajput
int main()
{
int f=1;
for(:f:)
cout<<"f="<<f++<<"
;
return 0;
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / sur
never..
because initially condition is true,
and x is false, so it will comes out of loop.
| Is This Answer Correct ? | 10 Yes | 23 No |
What is a storage class?
What is a constant? Explain with an example.
Differentiate between the message and method?
when can we use virtual destructor?
7 Answers HCL, HP, Virage Logic,
A prime number is a number which is divisible only by itself and 1. Examples of the first few primes are 2, 3, 5, 7, 11. Consider writing a program which can generate prime numbers for you. Your program should read in and set a maximum prime to generate and a minimum number to start with when looking for primes. This program should be able to perform the following tasks: 1. Read the maximum number from user (keyboard input) to look for primes. The program should not return any primes greater than this number. 2. Read the minimum number from user (keyboard input) to look for primes. The program should not return any primes less than this number. 3. Generate and print out every prime number between the maximum prime and minimum number specified by the user.
Is nan a c++?
Explain the need for "Virtual Destructor"?
Array base access faster or pointer base access is faster?
what is object?
What is the full form of c++?
Are iterators pointers?
Can c++ do everything c can?