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
Explain what is the benefit of using an enum rather than a #define constant?
my project name is adulteration of chille powder.how can i explain it to the hr when he asks me about the project?
What are compound statements?
How old is c programming language?
How many types of arrays are there in c?
Why ca not I do something like this?
When a c file is executed there are many files that are automatically opened what are they files?
What are the 5 organizational structures?
hai iam working in sap sd module for one year and working in lumax ind ltd in desp department but my problem is i have done m.b.a in hr/marketing and working sap sd there is any combination it. can you give right solution of my problem. and what can i do?
we called a function and passed something do it we have always passed the "values" of variables to the called function. such functions calles are called a) calls by reference b) calls by value c) calls by zero d) none of the above
regarding pointers concept
How can you find out how much memory is available?
What are the various types of control structures in programming?
What is ## preprocessor operator in c?
What are the advantages of c preprocessor?