main()
{
int i,j,A;
for(A=-1;A<=1;A++)
prinf("%d\t",!!A);
}
Answers were Sorted based on User's Feedback
Answer / ashwin kumar
sorry friends one small mistake in above explanation
hi friends
in c we must know one thing 1st
any number other than '0' is taken as true in c language
so as A=-1 1st
so A is true
now not of A i.e !A = false=0
now not of !A i.e !!A= true =1
so 1st 1 is printed
same if u do for A=0
it will be false 1st than true than false
i.e 0 is printed
for A=1 same as A=-1
there fore answer is 101
| Is This Answer Correct ? | 5 Yes | 0 No |
Answer / ashwin kumar
hi friends
in c we must know one thing 1st
any number other than '0' is taken as false in c language
so as A=-1 1st
so A is true
now not of A i.e !A = false=0
now not of !A i.e !!A= true =1
so 1st 1 is printed
same if u do for A=0
it will be false 1st than true than false
i.e 0 is printed
for A=1 same as A=-1
there fore answer is 101
| Is This Answer Correct ? | 2 Yes | 2 No |
what is c?
In C programming, what command or code can be used to determine if a number of odd or even?
what is the coding of display the factorial of a number using array and function?
What happens if a header file is included twice?
Where in memory are my variables stored?
What is the value of a[3] if integer a[] = {5,4,3,2,1}?
fun(int x) { if(x > 0) fun(x/2); printf("%d", x); } above function is called as: fun(10); what will it print? }
Is c compiled or interpreted?
what will be the output of" printf("%d%d",scanf("%d% d",&a&b));"
What is floating point constants?
write a program without using main function?
What is external variable in c?