For those who want to know the skeleton of C language in an amakudari manner

Overview

For those who want to know the skeleton of C language quickly. This article doesn't matter to those who are familiar with C language.

Preface

It's amakudari, so I only write what I really need. For more information, please refer to the text or web page.

#include Magic that reads the header file used in C language Without this, the program created by dripping sweat is also a bubble of water.

#include <stdio.h>

include is a header file specified in <> in the program to include I am instructing to read the file in which the function is written For the time being, I will write this first I mean, it doesn't work unless I write it

main function

As a second spell, add the following

void main(void){
   //program
}

Or

int main(void){
   //program
   ...

   return 0;
}

Use either one. At first, I think int ~ is better.

Summary

The flow up to this point can be summarized as follows.

#include <stdio.h>

int main(void){
   //program
   ...

   return 0;
}

It will be.

After that, embed the program under // program and compile it with an appropriate compiler to create an executable file, and it is completed.

Recommended Posts