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
文章標籤
全站熱搜
創作者介紹
創作者 mitblog 的頭像
mitblog

香腸炒章魚

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