You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
440 B

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// met en minuscule la chaîne
void minuscule(char *);
int main(int argc, char * argv[])
{
if(argc < 2)
{
printf("Usage : %s SenTeNCe\n",argv[0]);
exit(EXIT_FAILURE);
}
char * s = malloc(sizeof(char) * strlen(argv[1]));
s = strcpy(s,argv[1]);
minuscule(s);
printf("%s\n", s);
return EXIT_SUCCESS;
}
void minuscule(char * s)
{
while(*s++ && (*s = tolower(*s)));
}