You can use the unary operator 'sizeof' to determine the size of a variable or a data type. The sizeof operator returns a long unsigned integer, so you need to print the result using the '%lu' format specifier. The size of the variable will be in bytes.
Here is an example:
#include <stdio.h>
int main() {
int nn;
float ff;
double dd;
char cc;
printf("%lu\t", sizeof(nn));
printf("%lu\t", sizeof(ff));
printf("%lu\t", sizeof(dd));
printf("%lu\n", sizeof(cc));
return 0;
}
The above code will print the following: "4 4 8 1", i.e. size of the integer and float is 4 bytes, the size of the double is 8 bytes, and the size of char is 1 byte.