Write a program to find the size of int, float, double, and char.
C Program
#include <stdio.h>int main(){printf("Size of int is %d\n", sizeof(int));printf("Size of float is %d\n", sizeof(float));printf("Size of double is %d\n", sizeof(double));printf("Size of char is %d\n", sizeof(char));return 0;}
Output:
Size of int is 4
Size of float is 4
Size of double is 8
Size of char is 1
No comments:
Post a Comment