-
What is the output of this program?
#include <iostream>
#include <ctype.h>
int main ()
{
int k = 0;
char str[] = "Ajit Kumar Gupta";
char ch;
while (str[k])
{
ch = str[k];
if (islower(ch))
ch = toupper(ch);
putchar (ch);
k++;
}
return 0;
}
-
- AJIT KUMAR GUPTA
- Ajit Kumar Gupta
- Compilation Error
- Runtime Error
- None of these
Correct Option: A
In this program, We have converted the lower case letters to uppercase letters by using toupper function.