#include <iostream.h>
#include <conio.h>
void main()
{
clrscr();
cout<< " \nSize of character = " << sizeof(char);
cout<< " \nSize of integer = " << sizeof(int);
cout<< "\n Size of float = " << sizeof(float);
cout<< "\n Size of double = " << sizeof(double);
getch();
}
ALTERNATIVELY,
#include(iostream.h)
#include(conio.h)
void main()
{
clrscr();
int n;
float f;
char c;
double d;
cout<< " \nSize of character= " << sizeof(c);
cout<< " \nSize of integer = " << sizeof(n);
cout<< "\n Size of float = " << sizeof(f);
cout<< "\n Size of double = " << sizeof(d);
getch();
}
No comments:
Post a Comment