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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we need functions in c?

551


Explain what are global variables and explain how do you declare them?

635


What is the purpose of 'register' keyword?

683


code for quick sort?

1616


Explain how are 16- and 32-bit numbers stored?

779






a parameter passed between a calling program and a called program a) variable b) constant c) argument d) all of the above

650


Is c is a high level language?

612


Write a program that takes a 5 digit number and calculates 2 power that number and prints it(should not use big integers and exponential functions)

5787


the portion of a computer program within which the definition of the variable remains unchanged a) mode b) module c) scope d) none

639


Explain the priority queues?

617


Write a program to print all permutations of a given string.

638


A collection of functions,calls,subroutines or other data a) library b) header files c) set of files d) textfiles

641


The difference between printf and fprintf is ?

714


How do I read the arrow keys? What about function keys?

608


Explain can you assign a different address to an array tag?

639