C++--tricky one

Status
Not open for further replies.
OP
garfield_56

garfield_56

zzzzzzzzzz........
now here's another one-----the program code is extremely :eek:elementary, so i'll just remind all d programmers out there, that this is JUST FOR FUN:):D;)!!!


The question goes like this:::


Code:
int i, n = 20; 
for (i=0; i<n; i--) 
{ 
cout << "x" << endl; 
} 
 
/*   by changing only ONE character in the above code, meaning you cannot change 20 to 31, because you will have changed two characters, you can change 20 to 21, because you only changed the 0, do the following: 
find 3 ways to make the above code print x 20 times (by changing only one character). */

See wat i meant,--this is more of a mental ability :!:question, than a programming one.....
 

Quiz_Master

* Teh Flirt King *
1.
int begin()
{


}

2. int decode(a, n, i, m, a, t, e)(){


}

3. decode(a, n, i, m, a, t, e) is replace by main (# are not counted)



4.
int main()
{

}

Yeah, I remember having fun with same code back in 2nd semester! Even my teacher got fused. He said its fault of DevC++ (on which I was running the code) and that I should use TC++ ROFL :p
 

vamsi360

Always confused
hehe teachers donot even teach logics we have to get them by ourselves. I was enough tired with my teachers explanations
 
Status
Not open for further replies.
Top Bottom