Sunday, July 1, 2018

3. WAP to display the size of datatypes.

#include<stdio.h>
#include<conio.h>
void main()
{
   short int a;
   char b;
   float c;
   double d;
   printf("\nSize of int - %d", sizeof(a));
   printf("\nSize of char - %d", sizeof(b));
   printf("\nSize of float - %d", sizeof(c));
   printf("\nSize of double - %d", sizeof(d));
   getch();
}


OUTPUT:




Please have a look at the below video lesson posted on my YouTube channel:


No comments:

Post a Comment