开发者

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()
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜