求解求解
#include<stdio.h>void main()
{
int a;
long b;
float f;
double d;
char c;
printf("\nint:%d\nlong:%d\nfloat:%d\ndouble:%d\nchar:%d\n",sizeof(a) sizeof(b) sizeof(f) sizeof(d) sizeof(c));
}
C:\Users\CARRY\Desktop\C语言\14\1.c(10) : error C2143: syntax error : missing ')' before 'sizeof‘’
这应该怎么改? printf("\nint:%d\nlong:%d\nfloat:%d\ndouble:%d\nchar:%d\n",sizeof(a) sizeof(b) sizeof(f) sizeof(d) sizeof(c));
printf() 参数之间必须用逗号分隔
printf("\nint:%d\nlong:%d\nfloat:%d\ndouble:%d\nchar:%d\n" , sizeof(a) , sizeof(b) , sizeof(f) , sizeof(d) , sizeof(c));
页:
[1]