convert lowercase to uppercase c++ code example

Example 1: python convert string to lowercase

# By Alan W. Smith and Petar Ivanov
s = "Kilometer"
print(s.lower())

Example 2: c++ convert lowercase to uppercase

/* toupper example */
#include <stdio.h>
#include <ctype.h>
int main ()
{
  int i=0;
  char str[]="Test String.\n";
  char c;
  while (str[i])
  {
    c=str[i];
    putchar (toupper(c));
    i++;
  }
  return 0;
}

Example 3: uppercase capitalise character in string c++

str[i] = toupper(str[i]);

Example 4: convert an array to uppercase or lowercase js

var fruits = ["Banana", "Orange", "Apple", "Mango"];
undefined
string = fruits.join(' ').toUpperCase();
// Output"BANANA ORANGE APPLE MANGO"

Tags:

Cpp Example