Logo 
Search:

C Programming Articles

Submit Article
Home » Articles » C Programming » Homework HelpRSS Feeds

Program to print input text in upper case

Posted By: Shawn Mills     Category: C Programming     Views: 7890

Program to print input text in upper case

Code for Program to print input text in upper case in C Programming

#include<stdio.h>
#include<conio.h>
#include<string.h>
    void up(char a[]);
    void main()
    {
        char a[100];
        clrscr();
        printf("\nEnter The String : ");
        scanf("%s",a);
        printf("\nIn Upper Case : ");
        up(a);
        getch();
    }
    void up(char a[])
    {
        int i=0;
        while(a[i]!='\0')
        {
        printf("%c",toupper(a[i]));
        i++;
        }

    }

/*
******
OUTPUT
******


Enter The String : my world

Upper Case : MY WORLD
*/
  
Share: 


Didn't find what you were looking for? Find more on Program to print input text in upper case Or get search suggestion and latest updates.

Shawn Mills
Shawn Mills author of Program to print input text in upper case is from Phoenix, United States.
 
View All Articles

Related Articles and Code:


 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!