What will be the output of the code if we give input as sookshmas ?
#includestdio.h
#includectype.h
#includestring.h
int main()
{
char str[100],a[100];
int n,i;
printf("Enter a string\n");
gets(str);
n = strlen(str);
for(i=0;in;i++)
{
if(i%2==0)
{
a[i] = tolower(str[i]);
}
else
{
a[i] = toupper(str[i]);
}
}
printf("After string converstion\n");
for ( i = 0; i n; i++)
{
printf("%c",a[i]);
}
return 0;
}

Posted on by