Question: Write a C code to calculate the size of variables. ASK USER TO ENTER VARIABLES. You should calculate it for 5 variables that you user
Write a C code to calculate the size of variables. ASK USER TO ENTER VARIABLES. You should calculate it for 5 variables that you user gives them. These variables should be : 1) a char 2)an int 3)a float 4)a double 5)a string Example:
a ='A';
b =120;
c =123.05;
d =1222.90;
str[] ="Hello";
and the output is :
Size of a: 1
Size of b: 4
Size of c: 4
Size of d: 8
Size of str: 6
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
