User Forum

Subject :ICSO    Class : Class 6

What would be the output of the following QBASIC code, if user enters Rashi, 11 and 6 respectively for each input prompt?
CLS
INPUT "What is your name?", name$
INPUT "What is your age?", age
INPUT "Enter your class:", class
PRINT "Hello"; name$; "! How are you?"
PRINT
PRINT "You are"; age; "years old"
PRINT
PRINT "You study in class"; class

A
Hello Rashi! How are you?
You are 11 years old
You study in class 6
B
Hello Rashi! How are you?
You are 11 year old; you study in class 6
C
HelloRashi! How are you?
You are 11 years old
You study in class 6
D
Hello Rashi how are you?
You are 11 years old;
You study in class 6


???

Ans 1:

Class : Class 7
the right answer is A

Ans 2:

Class : Class 6
No, It's C as the ; seperator works for only numbers

Ans 3:

Class : Class 3
D

Ans 4:

Class : Class 6
Wrong it's A , but the real answer shows C , which is wrong as there is a separator between it .

Ans 5:

Class : Class 4
It's A, right? I agree with Harshita as there is the semicolon in between.

Post Your Answer