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
which of the following is not a character constant a) 'thank you' b) 'enter values of p, n ,r' c) '23.56E-o3' d) all of the above
Do variables need to be initialized?
How can I display a percentage-done indication that updates itself in place, or show one of those twirling baton progress indicators?
How many types of functions are there in c?
In c language can we compile a program without main() function?
What is return in c programming?
Explain what are linked list?
What is a structure in c language. how to initialise a structure in c?
What do you mean by a local block?
How will you divide two numbers in a MACRO?
How can I insert or delete a line (or record) in the middle of a file?
What is a keyword?
What do you mean by invalid pointer arithmetic?
typedef enum { html, java, javascript, perl, cgi } lang;The above statement defines a : a) Union b) User defined type c) Enumerated variable d) none
all c language question