FUNDAMENTALS OF COMPUTER

COMPUTER PROGRAMMING FUNDAMENTALS

WHAT IS PROGRAMMING

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which of the following represents the code that changes a variable string ____ name to uppercase characters?
A
string.upper()
B
string ____ name.upper()
C
string ____ name.uppercase()
D
None of the above
Explanation: 

Detailed explanation-1: -The toUpperCase() method converts a string to upper case letters. Note: The toLowerCase() method converts a string to lower case letters.

Detailed explanation-2: -Performing the . upper() method on a string converts all of the characters to uppercase, whereas the lower() method converts all of the characters to lowercase.

Detailed explanation-3: -toupper() function in C The toupper() function is used to convert lowercase alphabet to uppercase. i.e. If the character passed is a lowercase alphabet then the toupper() function converts a lowercase alphabet to an uppercase alphabet. It is defined in the ctype.

Detailed explanation-4: -The toUpperCase() method returns the value of the string converted to uppercase.

There is 1 question to complete.