{ 
if(Msg[cnt]>='B'&& Msg [cnt]<='G')
Msg[cnt] =tolower(Msg[cnt]);
else
if(Msg[cnt]=='N'?Msg[cnt]=='n'?Msg[c nt]==' ')
Msg[cnt]=CH; 
else
if(cnt%2==0)
Msg[cnt]=toupper(Msg[cnt]); 
else
Msg[cnt]=Msg[cnt-1];
} 
}
void main()
{
char MyText[]="Input Raw";
Mycode(MyText,'@'); 
cout<<"NEW TEXT:"<<MyText<<endl;
}
' href='chapter-1-c-plus-plus-revision-tour-solutions-5.aspx'>Find output of the following program segment :
#include
#include
void Mycode(char Msg[],char CH)
{
for(int cnt=0;Msg[cnt]!='\0';cnt++)
{ 
if(Msg[cnt]>='B'&& Msg [cnt]<='G')
Msg[cnt] =tolower(Msg[cnt]);
else
if(Msg[cnt]=='N'?Msg[cnt]=='n'?Msg[c nt]==' ')
Msg[cnt]=CH; 
else
if(cnt%2==0)
Msg[cnt]=toupper(Msg[cnt]); 
else
Msg[cnt]=Msg[cnt-1];
} 
}
void main()
{
char MyText[]="Input Raw";
Mycode(MyText,'@'); 
cout<<"NEW TEXT:"<
}
            
            
            
            Answer - 
            I@PPT@RRW
            
            
         
        Comment(S)
        
	
                
                Show all Coment
                Leave a Comment