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
Explain how can I convert a number to a string?
What should malloc(0) do? Return a null pointer or a pointer to 0 bytes?
How pointers are declared?
any limit on the number of functions that might be present in a C program a) max 35 functions b) max 50 functions c) no limit d) none of the above
Why is sizeof () an operator and not a function?
What are the restrictions of a modulus operator?
How can I send mail from within a c program?
How would you use the functions fseek(), freed(), fwrite() and ftell()?
How does sizeof know array size?
general for is %wd,f-d; in this system "w" means a) 'w' represent total width of digits b) 'w' represent width which includes the digits before,after decimal place and the decimal point c) 'w' represent width which includes the digits before only d) 'w' represent width after decimal place only
What is meant by recursion?
How do you define a string?
What is the most efficient way to count the number of bits which are set in an integer?
write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.
int main() { Int n=20,i; For(i=0;i<=n;i--) { Printf(“-“); Return 0;