## AMCAT COMPUTER PROGRAMMING PREVIOUS QUESTIONS (PAPERS) – 7

Ques11. Stuti is making a questionnaire of True-false questions. She wants to define a

data-type which stores the response of the candidate for the question. What is the

most-suited data type for this purpose?

Op 1: integer

Op 2: boolean

Op 3: float

Op 4: character

Op 5:

Correct Op : 2

Ques12. What will be the output of the following pseudo-code statements:

integer a = 456, b, c, d =10

b = a/d

c = a – b

print c

Op 1: 410

Op 2: 410.4

Op 3: 411.4

Op 4: 411

Op 5:

Correct Op : 4

Ques13. What will be the output of the following pseudo-code statements:

integer a = 984, b, c, d =10

print remainder(a,d) // remainder when a is divided by d

a = a/d

print remainder(a,d) // remainder when a is divided by d

Op 1: 48

Op 2: Error

Op 3: 84

Op 4: 44

Op 5:

Correct Op : 1

Ques. What will be the output of the following code statements?

integer a = 50, b = 25, c = 0

print ( a > 45 OR b > 50 AND c > 10 )

Op 1: 1

Op 2: 0

Op 3: -1

Op 4: 10

Op 5:

Correct Op : 1

Ques14. What will be the output of the following code statements?

integer a = 50, b = 25, c = 5

print a * b / c + c

Op 1: 120

Op 2: 125

Op 3: 255

Op 4: 250

Op 5:

Correct Op : 3

Ques15. What will be the output of the following code statements?

integer a = 10, b = 35, c = 5

print a * b / c – c

Op 1: 65

Op 2: 60

Op 3: Error

Op 4: 70

Op 5:

Correct Op : 1

Ques16. integer a = 10, b = 35, c = 5

Comment about the output of the two statements?

print a * b + c / d

print c / d + a * b

Op 1: Differ due to left-to-right precedence

Op 2: Differ by 10

Op 3: Differ by 20

Op 4: Same

Op 5:

Correct Op : 4

Ques17. integer a = 40, b = 35, c = 20, d = 10

Comment about the output of the following two statements:

print a * b / c – d

print a * b / (c – d)

Op 1: Differ by 80

Op 2: Same

Op 3: Differ by 50

Op 4: Differ by 160

Op 5:

Correct Op : 1

Ques18. integer a = 60, b = 35, c = -30

What will be the output of the following two statements:

print ( a > 45 OR b > 50 AND c > 10 )

print ( ( a > 45 OR b > 50 ) AND c > 10 )

Op 1: 0 and 1

Op 1: No error, the program is correct.

Op 2: Statement 1

Op 3: Statement 4

Op 4: statement 6

Op 5:

Correct Op : 3