C basic commands

Below are few commands and syntax used in C programming to write a simple C program. Let’s see all the sections of a simple C program line by line.

🍀#include <stdio.h>

  • This is a preprocessor command that includes standard input output header file(stdio.h) from the C library before compiling a C program

🍀int main()

  • This is the main function from where execution of any C program begins.

🍀{

  • This indicates the beginning of the main function.

🍀/some_comments/

  • whatever is given inside the command “/* */” in any C program, won’t be considered for compilation and execution.

🍀printf(“Hello_World! “);

  • printf command prints the output onto the screen.

🍀getch();

  • This command waits for any character input from keyboard.

🍀return 0;

  • This command terminates C program (main function) and returns 0.

🍀}

  • This indicates the end of the main function.

reference: fresh2refresh

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi阅读 7,499评论 0 10
  • 古梅二绝 湘妃危立冻蛟背,海月冷挂珊瑚枝。 丑怪惊人能妩媚,断魂只有晓寒知。 百千年藓著枯树,三两点春供老枝。 绝...
    江南莫之阅读 816评论 25 41
  • 主人公威尔是一家研究院的职员,从事研究一种治疗老年痴呆的药物ALZ—112,这种药物他研究了五年,终于在一只...
    我是奢侈品阅读 847评论 0 0