C tolower () - C standarta bibliotēka

Funkcija tolower () aizņem lielos burtus un pārvērš tos par mazajiem burtiem.

Ja tolower () funkcijai nodotie argumenti nav lielie alfabēti, tas atgriež to pašu rakstzīmi, kas tiek nodota funkcijai.

Tas ir definēts galvenes failā ctype.h.

Funkcija tolora prototips ()

 int tolower (int arguments);

Raksts tiek saglabāts vesela skaitļa formā C programmēšanā. Kad rakstzīme tiek nodota kā arguments, tiek nodota attiecīgā rakstzīmes ASCII vērtība (vesels skaitlis), nevis pati šī rakstzīme.

Piemērs: Kā darbojas tolower () funkcija?

 #include #include int main() ( char c, result; c = 'M'; result = tolower(c); printf("tolower(%c) = %c", c, result); c = 'm'; result = tolower(c); printf("tolower(%c) = %c", c, result); c = '+'; result = tolower(c); printf("tolower(%c) = %c", c, result); return 0; ) 

Rezultāts

 tolower (M) = m tolower (m) = m tolower (+) = +

Interesanti raksti...