What is the result
main()
{
char c=-64;
int i=-32
unsigned int u =-16;
if(c>i){
printf("pass1,");
if(c<u)
printf("pass2");
else
printf("Fail2");}
else
printf("Fail1);
if(i<u)
printf("pass2");
else
printf("Fail2")
}
a)Pass1,Pass2
b)Pass1,Fail2
c)Fail1,Pass2
d)Fail1,Fail2
e)none

Answers were Sorted based on User's Feedback



What is the result main() { char c=-64; ..

Answer / divyesh

Fail1, Pass2

Is This Answer Correct ?    23 Yes 2 No

What is the result main() { char c=-64; ..

Answer / jack

c) Fail1,Pass2..........

Is This Answer Correct ?    10 Yes 1 No

What is the result main() { char c=-64; ..

Answer / bee

answer is c...
fail1,pass 2

Is This Answer Correct ?    6 Yes 1 No

What is the result main() { char c=-64; ..

Answer / madhuri

here int i=-32 is not terminated so syntax error
if that statement was terminated then the answer would be
none in the given options because the output of the program
would be
pass1
pass2
pass2

Is This Answer Correct ?    3 Yes 1 No

What is the result main() { char c=-64; ..

Answer / bishnu agrawal

it is an error bcoz u can assing a signed value to unsigned variable so answer is null

Is This Answer Correct ?    1 Yes 1 No

What is the result main() { char c=-64; ..

Answer / subbu

this program gives an error that comparison between signed
and unsigned int

Is This Answer Correct ?    4 Yes 5 No

What is the result main() { char c=-64; ..

Answer / vikraman85

u should not assign a negative value to unsigned int! b'coz
it has only +ve values 0to2^15-1..

Is This Answer Correct ?    1 Yes 2 No

What is the result main() { char c=-64; ..

Answer / nageswari

none

Is This Answer Correct ?    1 Yes 5 No

What is the result main() { char c=-64; ..

Answer / karthika

pass1 fail2

Is This Answer Correct ?    1 Yes 5 No

Post New Answer

More C Interview Questions

what is diff between localstatic and globalstatis variable possible 2 use in another file...?

2 Answers   HCL,


#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,


print out put like this form 1 2 3 4 5 6 3 5 7 9 11 8 12 16 20

8 Answers   TCS,


What is the difference between fread buffer() and fwrite buffer()?

0 Answers  


What is the difference b/w Structure & Array?

6 Answers  






What is static volatile in c?

0 Answers  


what is difference between c and c++

4 Answers  


What does p mean in physics?

0 Answers  


How can you convert integers to binary or hexadecimal?

0 Answers  


which one is better structure or union?(other than the space occupied )

2 Answers  


without a terminator how can we print a message in a printf () function.

7 Answers   NIIT,


Which header file should you include if you are to develop a function which can accept variable number of arguments?

0 Answers   TCS, TISL,


Categories