निम्नलिखित का आउटपुट क्या होगा?
What will be the output of the following ?
import sys
sys.stdout.write('Welcome\n')
sys.stdout.write('All\n') A
Welcome All
B
Welcome
C
Compilation Error
D
Runtime Error
Explanation
The sys.stdout.write() method in Python writes a string to the standard output (usually the console) without automatically adding a newline. The \n character in the first statement is used to print a newline after "Welcome."
So, the output will be:
Welcome
All
Thus, the correct answer is:
(A) Welcome All
Correct Answer: A) Welcome All