Question: Given a char variable ch, which of the following converts ch to upper case if ch is a lower-case letter? a) if (ch >= 'a'

Given a char variable ch, which of the following converts ch to upper case if ch is a lower-case letter?

a) if (ch >= 'a' || ch <= 'z') ch = ch - 'A' + 'a';
b) if (ch >= 'a' && ch <= 'z') ch = ch - 'a' + 'A';
c) if (ch >= 'a' || ch <= 'z') ch = ch - 'a' + 'A';
d) if (ch >= 'a' && ch <= 'z') ch = ch - 'A' + 'a';

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!