what will be the output of the following program:
#include<iostream.h>
#include<ctype.h>
typedef char str[80];
void main()
{
char *notes;
str[80]="vR.2GooD";
int l=6;
notes=str;
while(l>3)
{str[l]=(isupper(str[l])?tolower(str[l]):toupper(str[l]));toupper(str[l]);
cout<<notes<<endl;
l--;
notes++;
}
}
The text says that the output is
VR2Good
R2Good
good how will i get that output?
Comments
Leave a comment