Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


main()
{
int i,j,A;
for(A=-1;A<=1;A++)
prinf("%d\t",!!A);
}

Answers were Sorted based on User's Feedback



main() { int i,j,A; for(A=-1;A<=1;A++) prinf("%d\t",!!A); }..

Answer / kimi

1 0 1

Is This Answer Correct ?    6 Yes 1 No

main() { int i,j,A; for(A=-1;A<=1;A++) prinf("%d\t",!!A); }..

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

main() { int i,j,A; for(A=-1;A<=1;A++) prinf("%d\t",!!A); }..

Answer / vignesh1988i

1 0 1

Is This Answer Correct ?    2 Yes 0 No

main() { int i,j,A; for(A=-1;A<=1;A++) prinf("%d\t",!!A); }..

Answer / y hussain reddy

1 0 1

Is This Answer Correct ?    1 Yes 0 No

main() { int i,j,A; for(A=-1;A<=1;A++) prinf("%d\t",!!A); }..

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

main() { int i,j,A; for(A=-1;A<=1;A++) prinf("%d\t",!!A); }..

Answer / mytri

-1 0 1

Is This Answer Correct ?    1 Yes 7 No

Post New Answer

More C Interview Questions

What is string concatenation in c?

0 Answers  


Tell us two differences between new () and malloc ()?

0 Answers   Adobe,


main() { printf(5+"good morning"); printf("%c","abcdefgh"[4]); }the o/p is morning and e...how someone explain

1 Answers  


how to implement stack operation using singly linked list

2 Answers  


Function to find the given number is a power of 2 or not?

20 Answers   Motorola, nvidia,


How is a null pointer different from a dangling pointer?

0 Answers  


What is a C array and illustrate the how is it different from a list.

1 Answers   Amazon,


IS STRUCTURES CAN BE USED WITHIN AN ARRAY?

7 Answers   Caritor,


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

1 Answers   Mind Tree, TCS,


What is Your Name :)

1 Answers  


Can you think of a way when a program crashed before reaching main? If yes how?

2 Answers  


What is operator precedence?

0 Answers  


Categories