adsense

Hii, welcome to my site. My name is Om prakash kartik. This blog helps you to learn programming languages concepts.

Write a program in C to covert small letter to capital letter and covert capital letter to small letter.

 Write a program in C to covert small letter to capital letter.

#include<stdio.h>
#include<conio.h>
  void main()
    {
    char ch;
    clrscr();
    printf("Enter a lower case alphabet:-");
    scanf("%c",&ch);
    ch=ch-32;
    printf("Capital alphabet=%c",ch);
    getch();
    }


Output:-



Write a program in C to covert capital letter to small letter.

#include<stdio.h>
#include<conio.h>
  void  main()
    {
    char ch;
    clrscr();
    printf("Enter a upper case alphabet:-");
    scanf("%c",&ch);
    ch=ch+32;
    printf("Lower case alphabet=%c",ch);
    getch();
    }

Output:-

Post a Comment

0 Comments