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 c?

4 Answers   IBM, TCS,


In C programming, what command or code can be used to determine if a number of odd or even?

0 Answers  


what is the coding of display the factorial of a number using array and function?

1 Answers  


What happens if a header file is included twice?

0 Answers  


Where in memory are my variables stored?

0 Answers  


What is the value of a[3] if integer a[] = {5,4,3,2,1}?

0 Answers  


fun(int x) { if(x > 0) fun(x/2); printf("%d", x); } above function is called as: fun(10); what will it print? }

17 Answers   NDS,


Is c compiled or interpreted?

0 Answers  


what will be the output of" printf("%d%d",scanf("%d% d",&a&b));"

4 Answers  


What is floating point constants?

0 Answers  


write a program without using main function?

2 Answers   TCS,


What is external variable in c?

0 Answers  


Categories