Saturday 19 November 2011

C interview questions with answers and explanation for freshers


(1)

#include"stdio.h"

void main(){

long double a=55555;

clrscr();

printf("%.2LE,%.2Le",a);

getch();

}

What will be output if you will execute above code?

(a) 5.56e+04, 5.56E+04

(b) 5.6e+04, 5.6E+04

(c) 5.56E+04, 5.56e+04

(d)Compiler error.

(e)None of the above.

(2)

#include"stdio.h"

void main(){

signed a=5;

unsigned b=5;

clrscr();

if(a==b)

printf("EQUAL");

else

printf("

No comments:

Post a Comment