SlideServe
Menu
Préférences
© SlideServe · v2026

C Language

richardfowler avatar
9 diapositives · 145 Views · Jan 04, 2020

C Language. By Sra Sontisirikit 49541212. Background of C language. C is high level language create in 1972 By Brian W . C . Kernighan & Dennis M . Ritchie Based on two languages : BCPL and B. Brian Kernighan. Dennis Ritchie. Goals and Purpose. Straightforward language

C Language - slide 1
01 / 9C Language
1 / 17

Télécharger la présentation

C Language
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. C Language By Sra Sontisirikit 49541212

  2. Background of C language • C is high level language create in 1972 • By Brian W. C. Kernighan & Dennis M. Ritchie • Based on two languages : BCPL and B Brian Kernighan Dennis Ritchie

  3. Goals and Purpose • Straightforward language • Provide low-level access to memory • Require minimal run-time support

  4. Language Structure and Syntax A C program basically has the following form: • Preprocessor Commands The preprocessor is a program that is invoked by the compiler to process code before compilation. • Type definitions • Function prototypes -- declare function types and variables passed to function. • Variables • Functions

  5. type function_name (parameters) { local variables C Statements }

  6. Language Structure and Syntax This is simple program that will print a String#include <stdio.h> int main(){printf("This is my first program in C.\n"); return 0; }

  7. #include <stdio.h> This line call "Compiler Directives" to command program to compile file "stdio.h", that use for call method printf. • int main() The line int main() declares the main function. Every C program must have a function named main somewhere in the code. • {...} The { and } symbols mark the beginning and end of a block of code. In this case, they are for the main method to contain the statements. • printf(...) The printf statement is called the format string. It can contain a string such as "This is my first program in C.". And the "/n" symbol is to move the print position to the next line. • return 0; This line means the function is ended.

  8. Variables

  9. Features of the language • Small size • Extensive use of function calls • Loose typing -- unlike PASCAL • Structured language • Low level programming readily available • Pointer implementation - extensive use of pointers for memory, array, structures and functions.