Strupr() function example program in C C++

Strupr() function example program in C C++

C के विभिन्न control statements को जानने के लिए देखें— Control statements in C

C और C++ दोनों भाषाओं में महत्वपूर्ण अंतर क्या है जानने के लिए देखें—C vs C++

C Language में Character Array या String किसे कहते है जानने के लिए देखें हमारा यह पोस्ट— Strings in C

Strupr() function example program in C

#include<stdio.h>
#include<string.h>
int main()
{
    char name[20];
    printf("Enter name : ");
    scanf("%s",&name);
    strupr(name);
    printf("The name is: %s",name);
    return 0;
}

Strupr() function example program in C++

#include<iostream>
#include<string.h>
using namespace std;
int main()
{
    char name[20];
    cout<<"Enter name : ";
    cin>>name;
    strupr(name);
    cout<<"The name is: "<<name;
    return 0;
}

Output of Strupr() function example program in C C++

Strupr() function example program in C C++

Important string programs in C C++

  1. String input-output without space
  2. String input-output with space
  3. Strlwr() function example program
  4. Strlen() function example program
  5. Strrev() function example program
  6. Strcpy() function example program
  7. Strcat() function example program
  8. Strcmp() function example program
  9. String and Pointer
Share it to:

Published by

admin

I am a computer teacher, programmer and web developer