I came across this qn in a debugging contest in college.
The out put must be

"aadd"

WHat should be given in conditional field. NO goto and exit statements.
[IMG]http://lulzimg.com/i13/b449cb.jpg[/IMG]

Can anyone help me??

I have never seen anything like this but this gives the needed output.

#include <iostream>
using namespace std;

int main()
{
    if( cout << "aa", 0)
		cout << "aa";
	else
		cout << "dd";
    return 0;
}

! (cout << "aa") ?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.