Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

write a c program to find size of variable

#include <stdio.h>

int main()
{
    int a;
    float b;
    char c;
    double d;

    printf("%d is the size of integer
", sizeof(int));
    printf("%d is the size of float
", sizeof(float));
    printf("%d is the size of character
", sizeof(char));
    printf("%d is the size of double
", sizeof(double));

    return 0;
}
 
PREVIOUS NEXT
Tagged: #write #program #find #size #variable
ADD COMMENT
Topic
Name
3+2 =