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 / nilambuja
at starting of loop..
(i=12;6||0;i--)and it print 12 12
(i=11;7||1;i--)and it print 11 11
like wise 10 10 9 9 8 8 7 7
and when (i=6;0||0;i--)
the condition is false hence the crosser will come out of
the loop ..hence output will be... 12 12 11 11 10 10 9 9 8 8
7 7
Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
What is %g in c?
What is c basic?
What is structure in c language?
Who is the founder of c language?
What is double pointer?
How does struct work in c?
swap 2 numbers without using third variable?
What is the difference between break and continue?
What is ambagious result in C? explain with an example.
Can true be a variable name in c?
What is the use of c language in real life?
What is the function of this pointer?
When can you use a pointer with a function?
What is difference between structure and union?
Why is C language being considered a middle level language?