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 the output of printf("%d", printf("Hello"));?

1 Answers  


Write a function that accepts a sentence as a parameter, and returns the same with each of its words reversed. The returned sentence should have 1 blank space between each pair of words. Demonstrate the usage of this function from a main program. Example: Parameter: “jack and jill went up a hill” Return Value: “kcaj dna llij tnew pu a llih”

5 Answers   Mind Tree,


Which one to choose from 'initialization lists' or 'assignment', for the use in the constructor?

0 Answers  


What are the types of c language?

0 Answers  


Explain the use of function toupper() with and example code?

0 Answers  


how does the C compiler interpret the following two statements p=p+x; q=q+y; a.p=p+x; q=q+y b.p=p+xq=q+y c.p=p+xq; q=q+y d.p=p+x/q=q+y

4 Answers   TCS,


wat s the meaning of (int *)p +4;

2 Answers  


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

0 Answers  


write a 'c' program to sum the number of integer values

8 Answers  


Find greatest number out of 10 number without using loop.

5 Answers   TCS,


what is the difference between getch() and getchar()?

10 Answers   Huawei, Infosys,


Do character constants represent numerical values?

0 Answers  


Categories