Write a C program that computes the size of int, float, double and char variables.

1 year ago
C Programming

/* program to compute size of int, float, double and char variables */ #include<stdio.h>

int main()

{

int i; float f; double d; char c;

printf(“ Size of integer variable = %d\n” , sizeof(i)); printf(“ Size of float variable = %d\n” , sizeof(f)); printf(“ Size of double variable = %d\n” , sizeof(d)); printf(“ Size of character variable = %d\n” , sizeof(c)); return 0;

}

Sanisha Maharjan
Jan 21, 2022
More related questions

Questions Bank

View all Questions

Top