gettng error in c program,very simple
Asked by
raushan kumar
#include <stdio.h>
void main()
{
char name[50], *p;
printf("enter the name\n");
gets(name);
p=&name[50];
printf("the name is \n");
while(*p!=NULL)
{printf("%c",*p);
p++;
}
}
}
output:
1.c: In function ‘main’:
1.c:9: warning: comparison between pointer and integer
1.c: At top level:
1.c:14: error: expected identifier or ‘(’ before ‘}’ token
raushan@
i am not understanding where's the mistake in main()
thank you
Question information
- Language:
- English Edit question
- Status:
- Answered
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask raushan kumar for more information if necessary.
To post a message you must log in.