Chinaunix首页 | 论坛 | 博客
  • 博客访问: 346423
  • 博文数量: 92
  • 博客积分: 2500
  • 博客等级: 少校
  • 技术积分: 960
  • 用 户 组: 普通用户
  • 注册时间: 2009-08-21 19:38
文章分类

全部博文(92)

文章存档

2010年(71)

2009年(21)

我的朋友

分类: 嵌入式

2009-09-02 19:44:59

Reference website:
Reference: "Embedded Linux, C-language programming practice"
In fact, in reference to web pages, you can already find all the C language standard library functions. Here I only list what I learned:
  C-set of the standard library functions are:
     : the standard set of input and output functions.
     : a set of function determining character type (whether upper case, numbers, spaces)

     : a set of function Operating string.
     : a set of mathematical applications related functions.
     : tool set, including the type conversion and some system functions.
     : a set of additional assertion functions.
     : variable parameters, tool kit. such as the printf function will use this package.
     : a set of function supporting jump feature

     : a set of processing interrupts.
     :a set of function dealing with the date and time
     : integer type maximum and minimum set.

     : maximum and minimum set of floating-point type.


1. Standard formal input and output class function
    Header files are involved in stdio.h and stdarg.h
   * scanf function: Format input string
   * printf functions: formatting output strings
   * putchar function: the output characters to the standard output
   * getchar function: get character from standard input
   * putc function: output characters to the file
   * getc function: get characters from a file
           while ((c = getchar ()! = EOF)) putchar (c)
           c = getc (pFile)
           getchar () is equivalent to getc (stdin)
   * gets function: get the string
   * puts the function: output the specified string
   * ungetc function: the return of characters to write


2. Character processing and conversion functions
   * sprintf function: formatted output string to a buffer
           sprintf (s, "% d", 123)
           sprintf (s, "% 08X", 456); turn 16 hex
           sprintf (s, "% 10.3f", 3.1434)
   * strcat and strncat functions: string concatenation
          char * strncat (char * dest, const char * src, size_t n)
   * strcpy and strncpy functions: string copying
          char strncpy (char * dest, const char * src, size_t maxlen)
   * strcmp and strncmp functions: String Comparison
           int strcmp (const char * s1, const char * s2)
           s1> s2 return 1
           s1 = s2 return 0
           s1    * strlen function: Get the string length of the
   * strchr and strrchr function: Character / String location
           strchar: search a character position of first occurrence
           strrchr: search a character position of last occurrence
   * strstr function: string search
   * strupr and strlwr function: to convert the letters
   * strdup and strndup function: string copying
           char * strdup (const char * s)
           The string s to copy to the specified memory cell


3. Math class functions counting
    div acos atan cos tan cosh exp frexp ldexp log modf pow sqrt ceil abs floor


4. Data structures and algorithms class functions
     * bsearch function: binary search
     * lfind function: linear search
     * lsearch function: linear search
     * qsort function: the use of ordered array of quick sort method
     * rand function: generate random number


5. File I / O operation class correlation function
     * fopen function: open file
     * fclose function: close file
     * fgetc function: read a character from a file
            fp = fopen ( "exit", "r")
            while ((c = fgetc (fp))! = EOF)
     * fputc function: to a specified character is written to the file stream
     * fgets function: read a string from a file
     * fputs function: to a specified string into the document
     * rewind function: Reset the file position of the file stream to read and write at the beginning of
     * ftell function: get the file stream to read position
     * fseek function: get the file stream to read position
     * fwrite function: to build the file to write to the file stream
     * fread function: read data from the file stream
     * fgetpos function: get the file location
                The stream's current location is recorded in the * position for the subsequent fsetpos () call using the
     * fsetpos function: Set File Location

 

6. Utility functions
     * assert function: diagnostic procedures
     * setjmp function: to save call

阅读(1028) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~