0% found this document useful (0 votes)
128 views4 pages

Cbds MCQ

This document contains a 10 question multiple choice quiz about data structures and algorithms concepts. The questions cover topics like arrays, structures, pointers, stacks, queues, sorting algorithms, searching techniques, binary search trees, and graphs. For each question there is an explanation in both English and Malay, followed by 3 potential multiple choice answers.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
128 views4 pages

Cbds MCQ

This document contains a 10 question multiple choice quiz about data structures and algorithms concepts. The questions cover topics like arrays, structures, pointers, stacks, queues, sorting algorithms, searching techniques, binary search trees, and graphs. For each question there is an explanation in both English and Malay, followed by 3 potential multiple choice answers.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

SAMPLE CBDS2103

REMINDER: READ CAREFULLY THE INSTRUCTIONS ON THE FRONT PAGE.


PERINGATAN: BACA DENGAN TELITI ARAHAN PADA MUKA SURAT HADAPAN.

1. Consider the following array declaration:


int numbers[3][3];
How many array elements can numbers store?

A. 3
B. 6
C. 9

Pertimbangkan pengisytiharan tatasusunan berikut:


int numbers[3][3];
Berapa elemen tatasusunan boleh disimpan dalam numbers?

A. 3
B. 6
C. 9

2. Consider the following structure declaration:


struct person {
char name[50];
int age;
};
What is the declaration of a variable teacher of type person?

A. person teacher;
B. struct person teacher;
C. struct teacher person;

Pertimbangkan pengisytiharan struktur berikut:


struct person {
char name[50];
int age;
};
Apakah deklarasi pembolehubah teacher untuk jenis person?

A. person teacher;
B. struct person teacher;
C. struct teacher person;

Page 1 of 4
SAMPLE CBCP2202

3. Pointer is a special kind of variable which is used to store the _________ of the variable.
A. address
B. character
C. float

Apakah penuding adalah sejenis pembolehubah khas yang digunakan untuk menyimpan
________ pembolehubah.
A. alamat

B. aksara
C. apungan

4. “A group of data items that is sequential, in which insertions and deletions are made
anywhere in the structure”.

Select the most appropriate term for the above statement.

A. Array
B. Linked List
C. List

Sekumpulan item data yang berjujukan, di mana sisipan dan penghapusan dibuat mana-mana
sahaja dalam struktur.

Pilih istilah yang paling sesuai untuk penyataan di atas.

A. Tatasusunan
B. Senarai terpaut
C. Senarai

5. Which of the following best explain the main characteristic of a Stack?

A. First in First Out (FIFO)


B. Last in First Out (LIFO)
C. Last in Last Out (LILO)

Manakah di antara berikut yang terbaik menerangkan ciri utama Timbunan?

A. First in First Out (FIFO)


B. Last in First Out (LIFO)
C. Last in Last Out (LILO)

Page 2 of 4
SAMPLE CBDS2103

6. What is the order of removal from a queue if the numbers 10, 5, 15 and 20 are placed in this
order, and then removed one at a time?

A. 5, 10, 15, 20
B. 10, 5, 15, 20
C. 20, 15, 5, 10

Apakah urutan pengeluaran dari giliran jika nombor 10, 5, 15 dan 20 diletakkan dalam susunan
ini, dan kemudian dikeluarkan satu demi satu?

A. 5, 10, 15, 20
B. 10, 5, 15, 20
C. 20, 15, 5, 10

7. A sorting algorithm divides the list into two parts: sorted and unsorted. Select the best
sorting algorithm that matches the description above.

A. Bubble Sort
B. Linear Insertion Sort
C. Simple Selection Sort

Algoritma isihan membahagikan senarai kepada dua bahagian: diisih dan tidak diisih. Pilih
algoritma isihan yang terbaik yang menepati huraian di atas.

A. Isih Gelembung
B. Isih Sisipan Linear
C. Isih Pilihan Mudah

8. Which of the following search techniques begins with the first record, and is done
continuously until the data is found or end of records is reached?

A. Binary Search
B. Binary Tree Search

C. Sequential Search

Manakah di antara teknik carian berikut bermula dengan rekod pertama, dan dilakukan secara
berterusan sehingga data didapati atau akhir rekod dicapai?

A. Carian Binari
B. Carian Pepohon Binari

C. Carian Berterusan

Page 3 of 4
SAMPLE CBCP2202

9. Where is the insertion of a new data item:R into this binary search tree (BST)?

H S

P T

A. To the right of H
B. To the right of P

C. To the left of T

Di manakah kemasukkan data item baru: R ke dalam pokok carian binari (BST) ini?

H S

P T

A. Ke kanan H
B. Ke kanan P
C. Ke kiri T

10. Select the most appropriate term for a graph with numbers labeled on the edges.

A. directed graph
B. simple graph
C. weighted graph

Pilih istilah yang paling sesuai untuk graf dengan nombor berlabel ditepi.

A. graf berarah
B. graf mudah

C. graf berpemberat

END OF QUESTION PAPER / KERTAS SOALAN TAMAT

Page 4 of 4

You might also like