Sir,please help me out with the output of this programme:-
#include<stdio.h>
#include<conio.h>
void main()
{
int a=18,b=12,i;
for(i=a<b?a:b;a%i||b%i;i--);
printf("%d %d",i);
}
Answer Posted / jaguar
Check how loop runs
At start of the loop for (I = 12; (18 % 12 || 12 % 12); i--)
1 ieteration  (6 || 0) and i = 11
1 ieteration  (7 || 1) and i = 10
1 ieteration  (0 || 3) and i = 9
1 ieteration  ( 2|| 4) and i = 8
1 ieteration  (4 || 5) and i = 7
1 ieteration  (0 || 0) and i = 6 Loop comes out then the
value of I prited is 6
| Is This Answer Correct ? | 1 Yes | 4 No |
Post New Answer View All Answers
What is a null string in c?
i have to apply for the rbi for the post of officers. i need to know abt the entrance questions whether it may be aps or techinical....
Is c procedural or object oriented?
What is the right way to use errno?
What is volatile, register definition in C
Why is sprintf unsafe?
What is a MAC Address?
Is anything faster than c?
What is the hardest programming language?
Explain low-order bytes.
What is page thrashing?
What are conditional operators in C?
What is selection sort in c?
What is the scope of an external variable in c?
hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm