Uts Struktur Data

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Rakan
R
Rakan
Community Contributor
Quizzes Created: 1 | Total Attempts: 5,209
| Attempts: 5,218 | Pertanyaan: 25
Please wait...

Question 1 / 25
0 %
0/100
Score 0/100
1. Suatu kumpulan komponen yang disusun secara berurutan dengan bantuan Pointer disebut:

Explanation

A linked list is a data structure in which a group of components are organized sequentially using pointers. Each component, called a node, contains a data element and a pointer that points to the next node in the list. This allows for efficient insertion and deletion of elements in the list, as well as dynamic memory allocation. Unlike arrays, linked lists can grow or shrink in size during program execution. Therefore, a linked list is the correct answer for a group of components arranged sequentially with the help of pointers.

Submit
Please wait...
About This Quiz
Data Structures Quizzes & Trivia

2. Contoh aplikasi array dimensi dua adalah

Explanation

The correct answer is "input nilai dan mata kuliah". This is because inputting nilai (grades) and mata kuliah (subjects/courses) requires storing multiple values for each student or individual. Using a two-dimensional array allows for organizing and accessing this data efficiently, with one dimension representing the students and the other dimension representing the different subjects or courses.

Submit
3. Yang termasuk struktur data sederhana yaitu

Explanation

The given options include different data types and data structures. The data types int, char, float, and bool are simple data types that can store single values. They are considered simple because they do not have any internal structure. On the other hand, options like array, struct, tree, and linked list are data structures that can store multiple values or elements in a structured manner. Therefore, the correct answer includes the simple data types int, char, float, and bool.

Submit
4. Array yang sering digunakan dalam menterjemahkan matriks pada pemrograman, adalah array berdimensi :

Explanation

Array yang sering digunakan dalam menterjemahkan matriks pada pemrograman adalah array berdimensi 2. Array berdimensi 2 digunakan untuk merepresentasikan matriks dengan baris dan kolom. Setiap elemen dalam array berdimensi 2 dapat diakses menggunakan indeks baris dan kolomnya.

Submit
5.
  1. void main()
  2.   {
  3.   ....  x,y,z;
  4.   clrscr();
  5.   cout <<"\n input nilai X="; cin >> x;
  6.   cout <<"\n input nilai Y="; cin >> y;
  7.   z = x + y;
  8.   cout <<"\n hasil penjumlahan =" << z;
  9.   getch();
  10.   }
  tipe data yang tepat untuk mengisi titik-titik pada baris 3 adalah

Explanation

The correct data type to fill in the blanks on line 3 is "int". This is because the variables x, y, and z are used to store integer values, as indicated by the arithmetic operation performed later in the code (x + y). Therefore, the appropriate data type to use for these variables is "int", which stands for integer.

Submit
6. Jika Head = Tail = Null, maka kondisi Linked List adalah : 

Explanation

The given condition "Head = Tail = Null" implies that both the head and tail of the linked list are null. This means that there are no elements in the linked list, making it empty.

Submit
7. Type data yang menghasilkan bentuk keluaran nilai True dan False (Benar dan Salah) , adalah

Explanation

Boolean (bool) adalah tipe data yang menghasilkan bentuk keluaran nilai True dan False (Benar dan Salah). Tipe data ini digunakan untuk menyimpan nilai kebenaran atau hasil perbandingan dalam pemrograman.

Submit
8. Pada deklarasi:   int A[5][4][2], jumlah elemen pada array tersebut sama dengan:

Explanation

The declaration int A[5][4][2] creates a three-dimensional array with dimensions of 5, 4, and 2. To find the total number of elements in the array, we multiply the dimensions together: 5 * 4 * 2 = 40. Therefore, the correct answer is 40.

Submit
9.   baru->data = databaru;   baru->next = NULL;  Pada deklarasi di atas, perintah NULL artinya

Explanation

The correct answer is "tidak ada simpul berikutny". In the given code snippet, the statement "baru->next = NULL" assigns the value of NULL to the "next" field of the "baru" node. This indicates that there is no next node connected to the "baru" node, implying that there are no more nodes in the linked list after it.

Submit
10. Type data dibawah ini, yang TIDAK termasuk dalam tipe data sederhana tunggal, adalah

Explanation

The given answer "string" is correct because it is not a simple single data type. In programming, simple single data types refer to basic data types that can hold only one value at a time, such as integers (int), floating-point numbers (float), and characters (char). However, a string is a data type that can hold a sequence of characters or a text, making it different from the other options provided.

Submit
11.
  1. main()
  2.         {
  3.         int r = 10,s;
  4.         s = 10 +  ++r;
  5.         cout <<"r = "<< r << '\n';
  6.         cout <<"s = "<< s << '\n';
  7.         }
Hasil eksekusi dari program diatas adalah ….  

Explanation

The correct answer is "r = 11, s = 21" because the value of r is incremented before it is used in the expression s = 10 + ++r. The prefix increment operator (++r) increases the value of r by 1, so r becomes 11. Then, the expression s = 10 + 11 is evaluated, resulting in s being assigned the value of 21. Therefore, the output of the program will be "r = 11" and "s = 21".

Submit
12. Berikut operasi pada linked list, kecuali:

Explanation

The given options represent operations that can be performed on a linked list. The options "menambah simpul" (adding a node), "menghapus simpul" (deleting a node), and "membaca simpul" (reading a node) are valid operations that can be performed on a linked list. However, the option "menambah linked list" (adding a linked list) is not a valid operation. Adding a linked list would involve merging two linked lists, which is not a standard operation on a linked list.

Submit
13. Setiap elemen dari  sebuah Array haruslah mempunyai type data yang sama, termasuk dalam karakteristik array yaitu :

Explanation

The correct answer is "homogen" because one of the characteristics of an array is that each element must have the same data type. This means that all elements in the array should be of the same type, such as integers, strings, or booleans. This ensures that the array is consistent and can be easily accessed and manipulated.

Submit
14. Setiap simpul dalam suatu Linked List terbagi menjadi dua bagian, yaitu 

Explanation

Setiap simpul dalam suatu Linked List terbagi menjadi dua bagian, yaitu medan data dan medan penyambung. Medan data menyimpan nilai atau informasi yang ingin disimpan dalam simpul, sedangkan medan penyambung menyimpan alamat atau referensi ke simpul berikutnya dalam Linked List.

Submit
15. ==, <=, >=, !=, termasuk dalam operator

Explanation

The given operators "==, =, !=" are relational operators. Relational operators are used to compare two values and determine the relationship between them. These operators are commonly used in programming to compare numbers or strings and return a boolean value (true or false) based on the comparison result. Therefore, the correct answer is "relasional".

Submit
16. Pada deklarasi: int x,y,*z, isi variabel z adalah:

Explanation

The variable z is declared as a pointer, which means it will store the memory address of another variable. Therefore, the correct answer is "Alamat memori" which translates to "Memory address" in English.

Submit
17. Diketahui float A[5] dan lokasi awal terletak di alamat  00F(H), maka lokasi A[3] adalah

Explanation

The given float array A[5] starts at address 00F(H). Each element in the array occupies a memory space of 4 bytes. Therefore, the address of A[3] can be calculated as follows: address of A[3] = address of A[0] + (size of each element * index of A[3]) = 00F(H) + (4 * 3) = 017.

Submit
18. Tringular Array dapat merupakan Upper Tringular ataupun Lower Tringular. Upper tringular Array, yaitu:

Explanation

The correct answer is that in an Upper Triangular Array, all elements below the main diagonal are equal to 0. This means that all elements in the lower part of the array, including the diagonal itself, have a value of 0.

Submit
19. Untuk mengolah data yang banyaknya tidak bisa ditentukan sebelumnya, maka disediakan satu fasilitas yang memungkinan untuk menggunakan suatu perubah yang disebut dengan

Explanation

Untuk mengolah data yang banyaknya tidak bisa ditentukan sebelumnya, salah satu solusinya adalah dengan menggunakan peubah dinamis. Peubah dinamis memungkinkan kita untuk mengalokasikan memori secara dinamis saat program berjalan, sehingga kita dapat menyesuaikan ukuran data sesuai kebutuhan. Hal ini berbeda dengan peubah statis yang memerlukan penentuan ukuran sebelum program dijalankan. Array dan struct juga merupakan jenis peubah, namun keduanya memiliki ukuran yang tetap dan tidak bisa diubah saat program berjalan.

Submit
20. prinsip stack yaitu  

Explanation

The correct answer is "last in first out." This principle refers to the order in which elements are accessed or removed from a stack data structure. In a last in first out (LIFO) stack, the last element that is added to the stack is the first one to be removed. This means that the most recently added element is always at the top of the stack and is the first one to be accessed or popped off the stack.

Submit
21. Array yang sangat banyak elemen nol-nya, dikenal sebagai

Explanation

A sparse array is an array that has a large number of zero elements. This means that most of the elements in the array are empty or not used. In contrast, an upper triangular array and a lower triangular array are specific types of multidimensional arrays where the elements above or below the main diagonal are zero, respectively. Therefore, the correct answer is sparse array.

Submit
22. Yang bukan karakteristik array yaitu:

Explanation

The correct answer is "dinamis". This is because arrays are not dynamic in nature. Once an array is created, its size cannot be changed. In contrast, dynamic data structures like linked lists allow for the addition or removal of elements at runtime. Arrays are also known for their random access property, which means that elements can be accessed directly using their index. Additionally, arrays are characterized by their homogeneity, meaning that all elements in an array must be of the same data type.

Submit
23. Pada saat awal, Top of Stack selalu bernilai 

Explanation

The correct answer is -1. This is because in the initial state, the top of the stack is always set to -1. This indicates that the stack is empty and there are no elements in it. As elements are pushed onto the stack, the top of the stack will be incremented accordingly.

Submit
24. Dalam Array Lower Tringular dengan 4 baris, total elemen <> 0 tidak lebih dari:  

Explanation

In a lower triangular array with 4 rows, the total number of elements that are not equal to 0 is 6.

Submit
25. Deklarasi Node :   typedef struct TNode{   int data;   TNode *next;   };   Pernyataan yang salah yaitu:

Explanation

The given statement that is incorrect is "TNode adalah variabel" (TNode is a variable). TNode is not a variable, but a struct type that is used to define a structure for creating nodes in a linked list. It is used to create instances of nodes, which can then be linked together using the "next" field to form a linked list.

Submit
View My Results

Quiz Review Timeline (Updated): Mar 22, 2023 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 22, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Apr 23, 2019
    Quiz Created by
    Rakan
Cancel
  • All
    All (25)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
Suatu kumpulan komponen yang disusun secara berurutan dengan bantuan...
Contoh aplikasi array dimensi dua adalah
Yang termasuk struktur data sederhana yaitu
Array yang sering digunakan dalam menterjemahkan matriks pada...
Void main() ...
Jika Head = Tail = Null, maka kondisi Linked List adalah : 
Type data yang menghasilkan bentuk keluaran nilai True dan False...
Pada deklarasi:   int A[5][4][2], jumlah elemen pada array...
  baru->data = databaru; ...
Type data dibawah ini, yang TIDAK termasuk dalam tipe data sederhana...
Main() ...
Berikut operasi pada linked list, kecuali:
Setiap elemen dari  sebuah Array haruslah mempunyai type data...
Setiap simpul dalam suatu Linked List terbagi menjadi dua bagian,...
==, <=, >=, !=, termasuk dalam operator
Pada deklarasi: int x,y,*z, isi variabel z adalah:
Diketahui float A[5] dan lokasi awal terletak di alamat  00F(H),...
Tringular Array dapat merupakan Upper Tringular ataupun Lower...
Untuk mengolah data yang banyaknya tidak bisa ditentukan sebelumnya,...
Prinsip stack yaitu  
Array yang sangat banyak elemen nol-nya, dikenal sebagai
Yang bukan karakteristik array yaitu:
Pada saat awal, Top of Stack selalu bernilai 
Dalam Array Lower Tringular dengan 4 baris, total elemen <> 0...
Deklarasi Node : ...
Alert!

Advertisement