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 |
When do you say that a digraph is acyclic A)if and only if its first search does not have back arcs B)a digraph is acyclic if and only if its first search does not have back vertices C)if and only if its first search does not have same dfnumber D)None of these
Give the output for the following program. #define STYLE1 char main() { typedef char STYLE2; STYLE1 x; STYLE2 y; clrscr(); x=255; y=255; printf("%d %d\n",x,y); }
What is a char in c?
what does ‘Bus Error’ mean?
What is the value of h?
I have seen function declarations that look like this
which type of aspect you want from the student.
Write a program to add the following ¼+2/4+3/4+5/3+6/3+... (Like up to any 12 no.s)
Write a program to accept a character & display its corrosponding ASCII value & vice versa?
Take an MxN matrice from user and then sum upper diagonal in a variable and lower diagonal in a separate variables. Print the result
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
WAP to accept rollno,course name & marks of a student & display grade if total marks is above 200?