Tolower

Tolower

La función tolower() convierte un Tipo de dato carácter a minúscula (A-Z a a-z).

En el lenguaje de programación C las variables del tipo Tipo de dato carácter(char) almacenan el código ASCII del carácter (deben de estar dentro del rango 0-255 ó 00-FF en hexadecimal).

Simplemente lo que hace tolower() es sumarle 32 al número entero correspondiente al código ASCII del carácter.

Ejemplo

#include <stdio.h>
#include <ctype.h> // para tolower
#include <conio.h> // UNICAMENTE EN BORLAND (NO ES ANSI C), permite usar getch()
 
int main()
 
{
char letra;
printf("Ingrese Letra:\n");
fflush(stdin);
scanf("%c",&letra);
letra = tolower(letra);
printf("\nSu letra es:%c",letra);
getch(); // espera que se tipee un caracter
}

En este caso si se ingresa la letra "A"(65 en ASCII), va a imprimir por pantalla "a"(97 en ASCII).

Véase también


Wikimedia foundation. 2010.

Игры ⚽ Поможем сделать НИР

Mira otros diccionarios:

  • Comparison of programming languages (string functions) — String functions redirects here. For string functions in formal language theory, see String operations. Programming language comparisons General comparison Basic syntax Basic instructions Arrays …   Wikipedia

  • D (programming language) — For other programming languages named D, see D (disambiguation)#Computing. D programming language Paradigm(s) multi paradigm: imperative, object oriented, functional, meta Appeared in 1999 (1999) Designed by …   Wikipedia

  • AWK — This article is about the programming language. For other uses, see AWK (disambiguation). AWK Paradigm(s) scripting, procedural, event driven Appeared in 1977 Designed by Alfred Aho, Peter Weinberger, and Brian Kernighan …   Wikipedia

  • Letter case — For the minimalist musical sub genre, see Lowercase (music). For New Testament minuscules, see Category:Greek New Testament minuscules. Williamsburg eighteenth century press letters In orthography and typography, letter case (or just case) is the …   Wikipedia

  • Case folding — is a term denoting the conversion of all characters in a string to lower or upper case, typically to make case insensitive comparisons. Case Folding in some high level languages Most, if not all, BASIC dialects provide these basic functions:… …   Wikipedia

  • Delegat (.NET) — Dieser Artikel wurde aufgrund von inhaltlichen Mängeln auf der Qualitätssicherungsseite der Redaktion Informatik eingetragen. Dies geschieht, um die Qualität der Artikel aus dem Themengebiet Informatik auf ein akzeptables Niveau zu bringen. Hilf… …   Deutsch Wikipedia

  • Ctype.h — Saltar a navegación, búsqueda ctype.h es un archivo de cabecera de la biblioteca estándar del lenguaje de programación C diseñado para operaciones básicas con caracteres. Contiene los prototipos de las funciones y macros para clasificar… …   Wikipedia Español

  • Haskell — Класс языка: функциональный, ленивый, модульный Тип исполнения: компилируемый, интерпретируемый Появился в: 1990 …   Википедия

  • MIK Code page — MIK is a Cyrillic code page to be used with MS DOS. It is based on the character set used in the Bulgarian [http://www.old computers.com/museum/computer.asp?st=1 c=615 Pravetz 16] IBM PC compatible system.This is the most widespread DOS/OEM code… …   Wikipedia

  • List of C functions — This page aims to alphabetically list all the predefined functions used in the C standard library, and a few of the non standard functions. * assert.h ** (no functions) * ctype.h ** (non standard) digittoint ** isalnum ** isalpha ** (non… …   Wikipedia

Compartir el artículo y extractos

Link directo
Do a right-click on the link above
and select “Copy Link”