Explanation:
print() is declared as void print().
In main(), the statement var = print(); tries to assign the return value of print() to an int variable.
But since print() has no return value (void), this causes a compile-time error.
Hence, the program does not compile.
Online Test Series, Information About Examination,
Syllabus, Notification
and More.
Online Test Series, Information About Examination,
Syllabus, Notification
and More.