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 the process to create increment and decrement stamen in c?

0 Answers  


What is structure packing ?

2 Answers   HP,


How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?

0 Answers  


Is malloc memset faster than calloc?

0 Answers  


Explain what would happen to x in this expression: x += 15; (assuming the value of x is 5)

0 Answers  


What is a symbolic constant?

1 Answers  


Can you assign a different address to an array tag?

0 Answers  


what is bitwise operator?

1 Answers   IBM,


What is the use of ?

0 Answers  


what value is returned to operating system after program execution?

0 Answers  


#define MAX(x,y) (x) >(y)?(x):(y) main() { inti=10,j=5,k=0; k= MAX(i++,++j); printf("%d..%d..%d",i,j,k); }

0 Answers   Wilco,


What are valid signatures for the Main function?

0 Answers  


Categories