Array String

strlen() 1 2 3 4 5 6 7 8 9 int strlen (char s[]) { int i; i = 0; while ( s[i] != '\0' ) ++i; return i; } memset() 1 void* memset(char s[], char c, int n); place character c into first n characters of s, return s.

January 1, 1970 · 1 min · Niiok

File

FILE fopen 1 FILE* fopen (char* name, char* mode); used to openning file with file name name. mode “r” : read “w” : write (will be overwrited), (make new file if it doesn’t exist and possible) “a” : append (make new file if it doesn’t exist and possible) “rb” : binary-read “wb” : binary-write (will be overwrited), (make new file if it doesn’t exist and possible) “ab” : binary-append (make new file if it doesn’t exist and possible) getc...

January 1, 1970 · 1 min · Niiok

Intro

Introduction Writer prefer 1983 ANSI C (K&R 2nd). C was born for UNIX C is machine independent C is simple and concise (even though program with it is complicated) Creator’s words C is a general-purpose programming language which features economy of expression, modern control flow and data structures, and a rich set of operators. C wears well as one’s experience with it grows....

January 1, 1970 · 2 min · Niiok