cout<<str;}Ans.: mic-oS-fT(c)Give the output of the following program:#includevoid ReCode ( char Text[ ], int Num );void main ( ){char Note [ ] = "Butterfly";Recode (Note, 2);cout << Note <<endl;}void ReCode (char Text [ ], int Num){for ( int K = 0 ; Text [K] !='\0' ; K++)if ( K % 2 == 0)Text [K] = Text [K]- Num;else if ( islower (Text[K] ))Text [K] = toupper ( Text [K] )elseText[K] = Text[K] + Num;}Ans.: @UrTcRdLw3(d)What will be the output of the following program:#include<iostream.h>#include<string.h>void main( ){ char Mes1[ ]=”HuB”, Mes2[ ]=”ThaT”, Mes3[ ]=”BeSt”;int L1=strlen(Mes1), L2=strlen(Mes2), L3=strlen(Mes3);int N=L1+L2+L3;for(int c=0; c<N; c++){if(c%4==0){cout<<Mes2[L2-1];L2--;}elseif(c%3==0){cout<<Mes1[L1-1];L1--;}else{cout<<Mes3[L3-1];L3--;}}}Ans.: TtSBaeuBhH3
2
Add a Comment