Skip to content

Pro Programming

Professional way of Programming

  • Home
  • C MCQs
  • C/C++
  • Java
  • Python
  • MySQL
  • Online Compiler
  • Topics
    • Arrays
    • Strings
    • Link Lists
    • Trees
    • Shapes
    • Articles
    • Games
    • Projects

Program to convert String to Uppercase C++

Write a Program to convert string to Uppercase C++.

PROGRAM:

#include<iostream>
using namespace std;

int main( )
{

    char str[80];
    cout<<"Enter a string:";
    gets(str);

    for(int i=0;str[i]!='';i++)
        str[i] = (str[i]>='a' && str[i]<='z')?(str[i]-32):str[i];
    cout<<str;

    return 0;
}

 

OUTPUT:

convert string to uppercase c++

Related Posts:

  • Java Convert int Array To String Example
  • Java String to String Array Example
  • Program to convert Decimal to Octal in C++
  • Python Program to Convert Decimal to Binary, Octal and Hexadecimal
  • Python Program to Convert Celsius To Fahrenheit
  • C++ program to convert decimal to binary
  • Python program to check if String is Palindrome or not
  • Java Program to Display String in Rectangle
  • Convert a list of multiple integers into single integer Python
  • Convert case of elements in a list of strings Python
  • Convert Octal to Hexadecimal in C++
  • Java Reverse String Array Example
  • Java Sort String Array Example
  • Java Stacktrace to String Example
  • Java Date to String Example
Categories string
Post navigation
Program to convert string to lowercase c++
Casino Game C++: Simple Number Guessing

Leave a Comment Cancel reply

Must See Content

  • Java Convert int Array To String Example
  • Java String to String Array Example
  • Program to convert Decimal to Octal in C++
  • Python Program to Convert Decimal to Binary, Octal and Hexadecimal
  • Python Program to Convert Celsius To Fahrenheit
  • C++ program to convert decimal to binary
  • Python program to check if String is Palindrome or not
  • Java Program to Display String in Rectangle
  • Convert a list of multiple integers into single integer Python
  • Convert case of elements in a list of strings Python

Recent Comments

  • David Bolton on Last Minute Notes: C and C++
  • Alisha Ross on Some mind blowing facts about Computers
  • Binary Search Tree implementation in C++ - Pro Programming on Program to check if Tree is Binary Search Tree C++
  • C++ program to implement AVL Tree - Pro Programming on Red Black-Tree(RB-Tree) implementation in C++
  • Program to Find Perfect Number in Python - Pro Programming on Program to find Perfect Number Program in C++
  • Email
  • Facebook
  • Twitter

Related Posts:

  • Java Convert int Array To String Example
  • Java String to String Array Example
  • Program to convert Decimal to Octal in C++
  • Python Program to Convert Decimal to Binary, Octal and Hexadecimal
  • Python Program to Convert Celsius To Fahrenheit
  • C++ program to convert decimal to binary
  • Python program to check if String is Palindrome or not
  • Java Program to Display String in Rectangle
  • Convert a list of multiple integers into single integer Python
  • Convert case of elements in a list of strings Python

Recent Posts

  • How to use MySQLDump effectively for backups
  • Top 10 Games for Beginners to learn programming the easy way
  • A simple Zombie War Game in C++
  • Mobile Numeric Keypad Problem: Solution in C++
  • Last Minute Notes: C and C++
  • JavatPoint Offline version Download Free
  • How to count number of non repeating digits in a Range C++
  • C++ Program to check if word exists in Grid or not
  • Top Cryptocurrency list of 2021
  • C Program to Implement Coppersmith Freivald’s Algorithm
© 2020 | ProProgramming | About | Contact US | Privacy Policy