为什么只打印a[0],b[0],c[0],d[0]
#include <string.h>
#include <stdio.h>
#include <math.h>
int main()
{
char a= "fishc" ;
int b = {1,2,3,4,5};
float c = {1.1,1.2,1.3,1.4,1.5};
double d = {1.1,1.2,1.3,1.4,1.5};
printf("a -> %p","a -> %p","a -> %p \n",&a,&a,&a);
printf("b -> %p","b -> %p","b -> %p \n",&b,&b,&b);
printf("c -> %p","c -> %p","c -> %p \n ",&c,&c,&c);
printf("d -> %p","d -> %p","d -> %p \n",&d,&d,&d);
}
#include <string.h>
#include <stdio.h>
#include <math.h>
int main()
{
char a= "fishc" ;
int b = {1,2,3,4,5};
float c = {1.1,1.2,1.3,1.4,1.5};
double d = {1.1,1.2,1.3,1.4,1.5};
printf("a -> %p,a -> %p,a -> %p \n",&a,&a,&a);//引号太多了,下面几行也是一样的错误
printf("b -> %p,b -> %p,b -> %p \n",&b,&b,&b);
printf("c -> %p,c -> %p,c -> %p \n",&c,&c,&c);
printf("d -> %p,d -> %p,d -> %p \n",&d,&d,&d);
}
页:
[1]