C program to change case of a string

  • برمجة سي c

C program to change case of a string

Strlwr function converts a string to lower case, and strupr function converts a string to upper case. Here we will change string case with and without strlwr and strupr functions. These functions convert the case of alphabets and ignore other characters that may be present in a string.

الأجوبة

#include <stdio.h>
#include <string.h>

int main()
{
   char string[1000];
   
   printf("Input a string to convert to lower case\n");
   gets(string);
   
   printf("The string in lower case: %s\n", strlwr(string));
   
   return  0;
}

output:

An output of the program:

Input a string
abcdefghijklmnopqrstuvwxyz{0123456789}ABCDEFGHIJKLMNOPQRSTUVWXYZ
ABCDEFGHIJKLMNOPQRSTUVWXYZ{0123456789}abcdefghijklmnopqrstuvwxyz
هل كان المحتوى مفيد؟

القوائم الدراسية التي ينتمي لها السؤال

تبحث عن مدرس اونلاين؟

محتاج مساعدة باختيار المدرس الافضل؟ تواصل مع فريقنا الان لمساعدتك بتأمين افضل مدرس
ماهو التخصص الذي تبحث عنه؟
اكتب هنا...