Question: Hello, I am stuck on this C-Programming question. Can anyone help me solve it? Write a code to calculate the size of variables. You should

Hello, I am stuck on this C-Programming question. Can anyone help me solve it?

Write a code to calculate the size of 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";

Result:

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!