-->
当前位置:首页 > 题库

PROGRAMMING:C programming experiment 1-2

Luz5年前 (2021-05-10)题库504
Familiar with C language integrated development environment code:: blocks, and refer to example 2.1b and example 2.2 program, output the value of variable in each line, and then output the number of bytes of memory occupied by the variable. Please complete the program, run the program under code:: blocks, observe the running result of the program, and submit the program after the result is correct.
The reference procedure is as follows:
int main()
{
int a = 1;
float b = 2.5;
char c = 'A';
printf("a=%d,sizeof(a)=%d\n", a, );
printf("b=%f,sizeof(b)=%d\n", , sizeof(b));
printf("c=%c,sizeof(c)=%d\n", , );
printf("End of program\n");
return 0;
}
###Input format:
There is no need to enter data from the keyboard
###Output format:
Refer to the output sample below to complete the program.
###Input example:
```in
```
###Output example:
```out
a=1,sizeof(a)=4
b=2.500000,sizeof(b)=4
c=A,sizeof(c)=1
End of program
```







answer:If there is no answer, please comment