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 string concatenation in c?
Tell us two differences between new () and malloc ()?
main() { printf(5+"good morning"); printf("%c","abcdefgh"[4]); }the o/p is morning and e...how someone explain
how to implement stack operation using singly linked list
Function to find the given number is a power of 2 or not?
How is a null pointer different from a dangling pointer?
What is a C array and illustrate the how is it different from a list.
IS STRUCTURES CAN BE USED WITHIN AN ARRAY?
Input is "Jack and jill went up a hill" To print output is 1-letter word(s)-1 2-letter words-1 3-letter words-1 4-letter words-4
What is Your Name :)
Can you think of a way when a program crashed before reaching main? If yes how?
What is operator precedence?