int isupper(int c);
引數 c 表示要檢測的字元。#include <stdio.h> #include <ctype.h> int main () { int i = 0; char str[] = "C++ Java Python C# Linux Golang Shelln"; char c; while(str[i]) { c = str[i]; if(isupper(c)) c = tolower(c); putchar(c); i++; } return 0; }執行結果: