Sail E0 Webinar
Question


Which of the following statements are correct about the program below?


#include<stdio.h>
int main()
{
char str[20], *s;
printf("Enter a string\n");
scanf("%s", str);
s=str;
while(*s != '\0')
{
if(*s >= 97 && *s
Options:
A .  The code converts a string in to an integer
B .  The code converts lower case character to upper case
C .  The code converts upper case character to lower case
D .  Error in code
Answer: Option B

This program converts the given string to upper case string.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers