Software & Finance





C Programming (Turbo C++ Compiler) - Converting From Lower Case to Upper Case Letters





Converting lower to upper case in turbo c is very easy and we can do it toupper, tolower , isupper and islower functions.


Source Code


#include <stdio.h>

#include <conio.h>

#include <ctype.h>

 

void main()

{

      printf("ESC to break\n");

      while(1)

      {

            char ch = getch();

            if( ch == 27)

                  break;

           

            if(islower(ch) != 0)

                  putch(toupper(ch));

            else

                  putch(ch);

      }

}

Output


ESC to break
WELCOME TO SOFTWARE AND FINANCE . COM