(q) What will be output of the following program ?
#include"stdio.h"
void main(){
long double a=55555;
clrscr();
printf("%.2LE,%.2Le",a);
getch();
}
output:5.56E+04,5.56e+04
%e or %E represent print the number in exponential format.
%e means output has small letter e.
%E means output has capital letter e.
(q) What will be output of the following program ?
#include"stdio.h"
void main(){
signed a=5;
unsigned b=5;
clrscr();
if(a==b)
printf("EQUAL");
else
printf("UNEQUAL");
getch();
}
output:Equal
Explanation: before any arithmetic operation small data type convert into higher data type i.e signed to unsigned.
The Vera Zvonareva Picture
-
*Vera Zvonareva*
NEW YORK CITY, NEW YORK
*V. ZVONAREVA/K. Kanepi6-3, 7-5*
THE MODERATOR: Questions, please.
*Q. Crazy, crazy kind of weather out...
13 years ago
No comments:
Post a Comment