jsz
2011-12-16 10:47:56 UTC
1111.c:11: warning: format ‘%s’ expects type ‘char *’, but argument 2 has type ‘char (*)[10]’
#include
main()
{
struct profile
{
char name[10];
int age;
};
struct profile p;
printf("enter name");
scanf("%s",&p.name);
printf("enter age");
scanf("%d",&p.age);
}
my compiler version is: gcc (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5
however the same program works well in turbo c compiler.PLZ help me work with my(Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5 compiler,
thanks