Courses » SS3 » SS3 ICT » ICT Exam Topics » Basic Programing III - Questions and Answers

Basic Programing III - SS3 ICT Past Questions and Answers - page 1

1

What is the purpose of the FOR-NEXT statement in BASIC?

A

To declare variables

B

To create loops

C

To print text

D

To define functions

correct option: b
Users' Answers & Comments
2

Which BASIC statement is used for creating loops based on a condition?

A

IF-THEN

B

GOTO

C

WHILE-END

D

PRINT

correct option: c
Users' Answers & Comments
3

In a FOR-NEXT loop, if you want to execute a block of code 5 times, what is the appropriate syntax?

A

FOR i = 1 TO 10

B

FOR i = 1 TO 5

C

FOR i = 1 UNTIL 5

D

FOR i = 5 TO 1

correct option: b
Users' Answers & Comments
4

How many times will the following FOR-NEXT loop execute?

css Copy code

FOR x = 3 TO 7

A

3 times

B

4 times

C

5 times

D

7 times

correct option: b
Users' Answers & Comments
5

What is the purpose of the DIM statement in BASIC?

A

To display text

B

To define a function

C

To declare variables

D

To allocate memory for arrays

correct option: d
Users' Answers & Comments
6

Which BASIC statement is used to check a condition and execute code based on whether the condition is true or false?

A

GOTO

B

IF-THEN

C

PRINT

D

WHILE-END

correct option: b
Users' Answers & Comments
7

What is the output of the following code?

java Copy code

x = 1

WHILE x < 5

    PRINT x

    x = x + 2

WEND

A

1 2 3 4

B

1 3 5

C

2 4 6

D

1 2 4

correct option: b
Users' Answers & Comments
8

Which statement is used to store data in an array in BASIC?

A

ASSIGN

B

STORE

C

INPUT

D

DIM

correct option: d
Users' Answers & Comments
9

To calculate the average of values in a one-dimensional array, what is the typical approach in BASIC?

A

Using the GOTO statement

B

Using a WHILE-END loop

C

Using the DIM statement

D

Using an IF-THEN statement

correct option: b
Users' Answers & Comments
10

How do you declare an array of 20 integers in BASIC?

A

DIM numbers(20)

B

DIM array(20)

C

DIM int_array[20]

D

DECLARE array AS INTEGER[20]

correct option: a
Users' Answers & Comments
Recommended: SS3 ICT Lessons
Please share this, thanks: