Convert string to uppercase [strupr()] || string manipulation in C || C programming
In this,we are going to see a program in which a whole string in converted into all UPPERCASE Letters using an in-built function of string.h header file in C Programming Language. 

//Program to make a string in UPPERCASE

#include <string.h>
#include <stdio.h>
int main()
{
    //declaring variables
    char destination[25];
    char *a = "Help for Coders";

    // syntax for copying string or string copying function
    strcpy(destination, a);
    printf("\nThe copied string is %s \n", destination);

    // Converting all the characters of the string t uppercase\capital-letters using string uppercase function
    strupr(destination);
    printf("\n%s is the UPPERCASE of the string \n", destination);
    return 0;
}

#ENJOY CODING


Post a Comment

FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP

Previous Post Next Post