how many times does the loop iterated ?
for (i=0;i=10;i+=2)
printf("Hi\n");
Answers were Sorted based on User's Feedback
Answer / ani
infinite loop, bcoz there is no condition to break the loop.
| Is This Answer Correct ? | 16 Yes | 3 No |
Answer / 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 |
Answer / pradeep
infinite loop becouse ther is no condition given there.
absence of condition it will be printing hi infinite time
| Is This Answer Correct ? | 5 Yes | 2 No |
Answer / altaf khan
it will give an error becoz in place of condition it is given a statement which does not returns boolean value
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / sai
It doesn't has condition in the loop to move on, and here i
is of type what?, not mentioned.
This loop doesn't executes with this condition, it should
be told i<= or i>= depending on the requirement.
| Is This Answer Correct ? | 1 Yes | 1 No |
my name is nani i completed my b-tech in hyd now i want go for interveiw but i dont know the process of software field interveiws plz help me anyone how many rouds there n what rounds plz plz plz help me n where i can get these details
What is the difference between typeof(foo) and myFoo.GetType()?
What do you mean by recursion in c?
main() { int a=0; if(a=0) printf("Ramco Systems\n"); printf("India\n"); } output?
How do you view the path?
What are enumerated types?
print out put like this form 1 2 3 4 5 6 3 5 7 9 11 8 12 16 20
What are the types of type specifiers?
Difference between fopen() and open()?
plz answer.. a program that takes a string e.g. "345" and returns integer 345
the expression a=30*1000+2768; evalutes to a) 32768 b) -32768 c) 113040 d) 0
You are given a string which contains some special characters. You also have set of special characters. You are given other string (call it as pattern string). Your job is to write a program to replace each special characters in given string by pattern string. You are not allowed to create new resulting string. You need to allocate some new memory to given existing string but constraint is you can only allocate memory one time. Allocate memory exactly what you need not more not less.