code snippets(一):tolower(參數),將大寫英文字母轉成小寫英文字母。

#include "stdafx.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>

int main(int argc, char *argv[])
{
	//tolower(參數)
	//參數:大寫英文字母轉成小寫英文字母。
	char str[3];
	memset(str,0x00,sizeof(str));
	str[0]=tolower('G');
	str[1]=tolower('E');
	printf("轉換後字元=%s\n",str);
	}
	return 0;
}
//Answer:轉換後字元=ge
arrow
arrow
    文章標籤
    int tolower(int c)
    全站熱搜

    mitblog 發表在 痞客邦 留言(0) 人氣()