The answer is: "Depends on your compiler and optimization options"
I do not remember if standard tells how compiler should handle these issues, so I suppose it can be anything from nothing (3+4 will be replaced by compile-time constant) or putting 3 and 4 into CPU registers, adding these values, putting them into RAM and finally using them somewhere or deallocating said RAM.
Most up-to-date compilers will just optimize out this line.
Ok, it will add 3 and 4 together and return 7 as result.
No, it doesn't write anything at all.
The first answer is half-correct. The expression 3 + 4 will evaluate to 7, assuming it's executed as written and not optimised away. It doesn't return anything, as such, because it's not a function or a method, but I assume that's what vlad meant.
But that expression doesn't actually do anything. It certainly doesn't write anything. So the second answer is also correct.
Why would you expect it to output anything at all if you did not even write "std::cout" anywhere? In the future remember: the program does exactly what you tell it to, nothing less and nothing more. If it is not doing something it is 100% of the time because you did not tell it to in that case.
In this case, you told it to add, but you never told it to display the result of adding, so it did not display anything.