strupr() string upper function - C-Tutorial

Latest

Friday, 7 October 2016

strupr() string upper function

strupr() function            

  • It refers to string upper function.

                                   
The general format of strupr() function is:

            Syntax:           strupr(string);

            Function is used to convert all characters in the given string from lower case to upper case characters. 

/* PROGRAM TO PRINT A STRING IN UPPER CASE */

#include<stdio.h>
#include<conio.h>
#include<string.h>
main()
{
            char str[10];
            clrscr();
            printf("\nEnter a String in Lower Case:");
            gets(str);
            printf("\nResult String in Upper Case = %s", strupr(str));

}

No comments:

Post a Comment