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 |
O,T,T,F,F,S,S,E,N,?,?,?,T,F,F,S,S,E,N
How do shell structures work?
How can I implement opaque (abstract) data types in C? What's the difference between these two declarations? struct x1 { ... }; typedef struct { ... } x2;
Explain union. What are its advantages?
How can I read/write structures from/to data files?
Write a program to implement queue.
What is external variable in c?
1. Write a c pgm to print 1 to 100 without using loops. 2. Write a c pgm for leap year 3. Write a c pgm fibbonacci series,factorial 4. Write a c pgm count no of lines , blanks, tabs in a para(File concept) 5. Write a c pgm to print the letter as per given condition i.e.. if u give 4 out put should b 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 6.how do get the o/p in number from 1 to 100 in the screen without using control statement? 7. who do u print the word "hello world" without using "printf" statement? 8. write sql program to get the detail of student in a class? Definitions: structure union arrays linkedlist macros directives difference b/w pre processorsDiffrence: 1.Constructors and destructors 2.Structure and Union 3.Array and Lists 4.pre processor... 5. Privillages in C++ 6.structure and union 7.break and continue 8.while and dowhile Pgm..
Implement a function that returns the 5th element from the end in a singly linked list of integers in one pass.
How to write the code of the program to swap two numbers with in one statement?
int main() { int i=1; switch(i) { case '1': printf("hello"); break; case 1: printf("Hi"); break; case 49: printf("Good Morning"); break; } return 0; }
Write a program to generate prime factors of a given integer?