Menu
Question Index
...

Write a program to convert all letters in a character array to upper case

Input(char Array) Output(char Array)
{'B', 'E', 'n', 'g', 'a', 'l', 't', 'i', 'G', 'e', 'r'} {'B', 'E', 'N', 'G', 'A', 'L', 'T', 'I', 'G', 'E', 'R'}
{'e', 'l', 'e', 'p', 'h', 'a', 'n', 't'} {'E', 'L', 'E', 'P', 'H', 'A', 'N', 'T'}
{'R', 'O', 'B', 'O', 'T'} {'R', 'O', 'B', 'O', 'T'}



class ConvertToUpperCase
{
    public static void main(String s[])
    {
        char[] inputArray = {'h', 'e', 'l', 'l', 'o', 'i', 'n', 'd', 'i', 'a'};
        char[] outputArray = convertToUpperCase(inputArray);
        System.out.print("The character array is " );
        for(int i = 0; i < outputArray.length; i++ )
        {
            System.out.print(outputArray[i] + ", ");
        }

    }


    public static char[] convertToUpperCase(char[] input)
    {
    }  

}

Doubts

Problems

Topic: Learn Arrays And Loops

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App