Chapter I.

Source: Internet
Author: User

1. The binary code that the computer can directly identify and accept is called machine instruction----(set) machine language.

2. Output C

#include <stdio.h>int main () {   printf ("This is a C program.\n");   return 0;             }

3. Keyboard input

#include <stdio.h>int main () {int max (int x, int  y), int  A, B, C,  scanf ("%d,%d", &a,&b), C = max ( A, B);p rintf ("max =%d\n", c); return 0;} The  max function for the larger of the two integers, int max (int x, int y) {int z; if (x>y) z = x; elsez = y;
return z;}

4. Structural features of C language programs

1) A program consists of one or more source files

1. Preprocessing commands

2. Global Declaration

3. Function definition

2) function is the main part of C program

3) A function consists of two parts

1. The first part of the function, such as int main ();

2. Function body

1. Declarations section

2. Executive Section

4) The program always executes from the main function

5) The operation of the computer in the program is done by the C statement in the function

6) There must be a semicolon at the end of each data declaration and statement

7) The C language itself does not provide input and output statements

8) The program should contain comments

 

Chapter I.

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.