Syntax error in C program
#include < st开发者_高级运维dio.h >
int main() {
char *s;
s=call();
printf(s);
}
char* call() {
return("hello");
}
Why these code not working. It's generating an error. How do I make it work?
Two things:
- You can't put spaces inside the angle brackets when including a system header (e.g.
#include <stdio.h>
- You need a prototype for
call()
精彩评论