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 far pointer in c?
Why c is called object oriented language?
Write programs for String Reversal & Palindrome check
What are preprocessor directives in c?
a value that does not change during program execution a) variabe b) argument c) parameter d) none
What is LINKED LIST? How can you access the last element in a linked list?
Why cant I open a file by its explicit path?
What is ## preprocessor operator in c?
What is the difference between printf and scanf )?
What are all different types of pointers in c?
A c program to display count values from 0 to 100 and flash each digit for a secong.reset the counter after it reaches 100.use for loop,. pls guys hepl me.. :(
what are the different storage classes in c?
What is the use of sizeof?
How can you call a function, given its name as a string?
cin.ignore(80, _ _);This statement a) ignores all input b) ignores the first 80 characters in the input c) ignores all input till end-of-line d) iteration