1, simple program "Hello,word"

Source: Internet
Author: User

#include <stdio.h>//the. h file is a header file; Stdio refers to "standard input & Output", so it is necessary to include the header file when using the standard input/output function; header file definition: 1, #include <stdio.h > 2, #include "stdio.h"intMain ()//when there is a return value: Data type function name (), if required: Data type function name (data type variable); no return value: void function name (); if variable: void function name (data type variable){printf ("hello,word\n");//\ n is a line break, or two: printf ("Hello,word"); printf ("\ n");return 0;//Return indicates that the function returned from the callback to the key function continues execution, which can be returned with a return value specified by the argument following return. If function execution does not need to return the result of the calculation,}//It is also often necessary to return a status code to indicate whether the function is performing smoothly (-1 and 0 are the most commonly used status codes) if you have a return type definition in front of the name, such as int,double, you must have a return value,//In the case of void type, the return is not written, but the value cannot be returned even if it is written. 
View Code

The functions contained in the stdio.h:

File access Binary input/output Non-formatted input/output Format Input/Output Format Input/Output File location Error handling File operations
fopen
Freopen
Fflush
Fclose
Fread
Fwrite
Fgetc/getc
Fputc/putc
Ungetc
Fgets
Fputs
Fgetc/getc
Fputc/putc
Ungetc
Fgets
Fputs
scanf/fscanf/sscanf
printf/fprintf/sprintf
Perror
Ftell
Fseek
Fgetpos
Fsetpos
Rewind
Feof
Ferror
Remove
Rename
Tmpfile

Common data type ranges:

1, simple program "Hello,word"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.