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

.main() { char *p = "hello world!"; p[0] = 'H'; printf("%s",p); }

0 Answers   Wilco,


What are the various types of control structures in programming?

0 Answers  


size maximum allocated by calloc()

3 Answers   DELL,


while initialization of two dimensional arrays we can initialize like a[][2] but why not a[2][] is there any reason behind this?

4 Answers   Aptech,


explain what are pointers?

0 Answers  






Given below are three different ways to print the character for ASCII code 88. Which is the correct way1) char c = 88; cout << c << " ";2) cout.put(88);3) cout << char(88) << " "; a) 1 b) 2 c) 3 d) constant

0 Answers  


What is a far pointer in c?

0 Answers  


34.what are bitwise shift operators? 35.what are bit fields? What is the use of bit fields in a structure declaration? 36.what is the size of an integer variable? 37.what are the files which are automatically opened when a c file is executed? 38.what is the little endian and big endian? 39.what is the use of fflush() function? 40.what is the difference between exit() and _exit() functions? 41.where does malloc() function get the memory? 42.what is the difference between malloc() and calloc() function? 43.what is the difference between postfix and prefix unary increment operators?

3 Answers  


write a program to search for an element in a given array. If the array was found then display its position otherwise display appropriate message in c language

18 Answers   IT Park, TCS,


pointer_variable=(typecasting datatype*)malloc(sizeof(datatype)); This is the syntax for malloc?Please explain this,how it work with an example?

2 Answers   eClerx, Excel, kenexa,


void main() { int x=25,y=32; clrscr(); x=x++ + y++; y=++x + ++y; printf("%d%d",x,y); }

5 Answers  


What is nested structure in c?

0 Answers  


Categories