Report Bug

QusWhich of the following programs correctly prints the sum of two numbers? Qusनिम्न में से कौन-सा program दो numbers का sum सही तरीके से print करता है?


A. print(input() + input())
B. print(int(input()) + int(input()))
C. print(input + input)
D. print(eval(input))


Solution
B. print(int(input()) + int(input()))



Explanation
input() returns strings, so int() converts both inputs to integers before addition.

input() string return करता है, इसलिए addition से पहले दोनों values को int() में convert करना आवश्यक है।
Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2026 Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Best Website and Software Company in Allahabad