Professional Documents
Culture Documents
6
Question 1:
3. Display that how many characters were between 0-9 (both inclusive)
4. Display how many characters other than letters and numbers are present
6. Display the ASCII value of the maximum character (along with that character)
Input:
Iramn@2bAbas?0
Output:
Upper Case: 2
Lower Case: 8
0-9: 2
Other: 2
Length: 14
Question 2:
Compare two character arrays (strings). For this purpose, see the explanation given below: Start
comparing the first character of each string. If they are equal to each other, it continues with the
following pairs until the characters differ or until a terminating null character is reached. This operation
does not take into account the length of the strings.
Input:
String1: section
String2: sectionA
Output:
-2
Input:
String1: finalsarecoming
String2: finalsarenotcoming
Output:
-1