Write C++ program to convert a string to upper case


techstudy.org

HP 15 Core i3 7th gen Laptop(4GB, 1TB HDD, Windows 10) | Rs. 31,490

Introduction

I have used CodeBlocks compiler for debugging purpose. But you can use any C++ programming language compiler as per your availability.


  1. #include <iostream>
  2. #include <string.h>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. char string[10];
  8.  
  9. cout<<"Input a string to convert to upper case"<<endl;
  10. cin.getline(string, 10);
  11.  
  12. cout<<"Characters in uppercase:"<< strupr(string);
  13. // strupr is use to convert lower case character to upper case
  14.  
  15. return 0;
  16. }
  17.  

Result

C++ language techstudy.org

     





Related Topics




Popular Posts