Sign in with
Sign up | Sign in
Your question
Solved

Problem working in gcc

Tags:
  • Business Computing
Last response: in Business Computing
Share
March 17, 2014 7:58:55 AM

I have written this c program:

#include<stdio.h>
main()
{
unsigned char name;
printf("\nEnter your name:\n");
scanf("%12s",name);
printf("Welcome: %-8s \n",name);
}


When i compile it give the following error:
Welcome.c:6:1: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘int’ [-Wformat]
Welcome.c:7:1: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘int’ [-Wformat]


please help me!

More about : problem working gcc

Best solution

March 17, 2014 8:05:25 AM
Share
March 17, 2014 8:27:05 AM

Thanks for the help, it works neat! :) 
m
0
l
Related resources
!