Why is this happening?

Why is this happening?

by Cody Chambers -
Number of replies: 1

I'm having a  problem with a quiz question.  I have posted it below.  There are no Xs in the question, but they display when viewed as you can see below. Where are these "X's" coming from?  Can someone please help me with this?big grin

 

Given the function strange, select the values of one and letter after these statements execute:
 int Xone= 5;
 char letter = A;
 strange(one, letter);

void strange(int & u, char & ch)

{
   int a;
   u = 2 * u;
   a = static_cast<int>(ch);
   a++;
   ch = static_cast<char>(a);
}
 

Answer:  

a. Xone= 5; letter = 'A'

b. Xone= 5; letter = 'B'

c. Xone= 10; letter = 'A'

d. Xone= 10; letter = 'B'

e. Xone= 12; letter = 'A'

f. Xone= 12; letter = 'B'

Average of ratings: -
In reply to Cody Chambers

Re: Why is this happening?

by Petr Skoda -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers
Hi!

it is a cross site scripting protection, learn to live with it wink

Try inserting some invisible html code either in between "o-n" or before the equal sign.

skodak