728x90 AdSpace

Latest Article



Write program to convert a string into lower case in C C++ Code Example




A PROGRAM TO CONVERT STRING INTO Lower Case   in C C++ Code Example
Write a c C++ program to convert the string from lower case to upper case using Loops ANSI

/* =========================================================================
     A PROGRAM TO CONVERT STRING INTO
      [LOWER CASE]
=========================================================================== */
#include<stdio.h>
#include<conio.h>
#include<string.h>           
#include<ctype.h>         
void main(void)
{
char ch, string[80];
int length, index;
do
 {
  clrscr();
  puts("ENTER THE STRING");
  gets(string);
  length=strlen(string);    
  for(index=0;index<length;index++)
   {
/////////////////////////////////////////////////////////////////////////////
    if((string[index] >='A')&&(string[index]<='Z'))  // LOWER CASE CHECK
    string[index]=_tolower(string[index]);          // FUNCTION TO CONVERT
  //  STRING TO LOWER CASE
////////////////////////////////////////////////////////////////////////////
   }
  puts(string);
  printf(" \n [PRESS '-' TO EXIT  &  '+' TO CONTINUE]\t");
  ch= getche();
 } while((ch!='-'));
getch();
}



no image
  • Title : Write program to convert a string into lower case in C C++ Code Example
  • Posted by :
  • Date : 07:44
  • Labels :






  • Blogger Comments
  • Facebook Comments

0 comments:

Post a Comment