What output is generated from the following code: cout << 2 * (5.0/2) << endl;

cout print something on console screen. in these case will print '5', because 5.0/2 will be 2.5(because the 1st number will be considered float\double), and multiply by 2 will be 5.
anotherthing: the '()' is more important on math than '*'. it's the operations order sequency like math.
i hope help you

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.