how many times does the loop iterated ?
for (i=0;i=10;i+=2)
printf("Hi\n");
Answer Posted / vignesh1988i
this will give an warning message .....
it will print the "Hi" infinite times...... since we used
assignment opeartor in the termination condition of the
looping statement....
when i is initilized to 0 first.. again i=10 is been
initilized to 10... so however i is been incremented by 2 or
by n times.... i=10.. which will be an non zero value.... so
it wont come out of the loop.... infered as infinite running.
Is This Answer Correct ? | 6 Yes | 2 No |
Post New Answer View All Answers
Can you add pointers together? Why would you?
Is c programming hard?
Is return a keyword in c?
What does the error 'Null Pointer Assignment' mean and what causes this error?
Tell me is null always defined as 0(zero)?
What are the 5 types of organizational structures?
Do pointers take up memory?
What is the description for syntax errors?
Explain how can I prevent another program from modifying part of a file that I am modifying?
Why we use void main in c?
What do you mean by scope of a variable in c?
Difference between Shallow copy and Deep copy?
What is a MAC Address?
can any one tel me wt is the question pattern for NIC exam
Why isn't any of this standardized in c? Any real program has to do some of these things.