Page 169 - C++
P. 169
else
NAME[x]--;
cout<<NAME<<endl;
}
Ans. AOROoIiE
(e) Give the output of the following code: (2)
#include<iostream.h>
#include<ctype.h>
void Encode(char Info[ ], int N);
void main( )
{
char Memo[ ] = “Justnow”;
Encode(Memo,2);
cout<<Memo<<endl;
}
void Encode(char Info[ ], int N)
{
for (int I=0,Info[I]!=’\0’;I++)
if (I%2==0)
Info[I]=Info[I]-N;
else if (islower(Info[I]))
Info[I] = toupper(Info[I]);
else
Info[I]=Info[I]+N;
}
Ans. HuQTlOu
(f) ) Observe the following C++ code and find the possible output(s) from the options (i) to (iv) following it.
Also, write the maximum and the minimum values that can be assigned to the variable PICKER.