成免费的crm,久久国产精品新农夫导航新妓网,恋夜秀场全部视频安卓手机,女校花强奷在线播放A级

C語言 庫函數 tolower()

C語言 庫函數 tolower()

C語言 標準庫 <ctype.h>C語言 標準庫 <ctype.h>

C 庫函數 int tolower(int c) 把給定的字母轉換為小寫字母。

 

1. 聲明

下面是 tolower() 函數的聲明。

int tolower(int c);

 

2. 參數

  • c -- 這是要被轉換為小寫的字母。

 

3. 返回值

如果 c 有相對應的小寫字母,則該函數返回 c 的小寫字母,否則 c 保持不變。返回值是一個可被隱式轉換為 char 類型的 int 值。

 

4. 實例

下面的實例演示了 tolower() 函數的用法。

#include <stdio.h>
#include <ctype.h>

int main()
{
   int i = 0;
   char c;
   char str[] = "CODEBAOKU TUTORIALS";

   while( str[i] ) 
   {
      putchar(tolower(str[i]));
      i++;
   }
 
   return(0);
}

讓我們編譯并運行上面的程序,這將產生以下結果:

codebaoku tutorials

C語言 標準庫 <ctype.h>C語言 標準庫 <ctype.h>

下一節:C 庫函數 toupper()

C 簡介

相關文章