1.
Tahun 1989, dunia pemrograman C mengalami peristiwa penting dengan dikeluarkannya standar bahasa C oleh ….
Correct Answer
A. ANSI
Explanation
In 1989, an important event occurred in the C programming world with the release of the C language standard by ANSI. ANSI stands for the American National Standards Institute, which is responsible for developing and promoting standards in various industries, including programming languages. The release of the C language standard by ANSI brought uniformity and consistency to the C programming language, making it easier for programmers to write portable and compatible code across different platforms and compilers.
2.
Secara resmi bahasa baru pengembangan dari bahasa C yang dikenal dengan bahasa C++ dirilis pada tahun ….
Correct Answer
A. 1978
3.
Kompilasi atau kompile (compile) adalah ….
Correct Answer
D. Proses merubah source code ke bahasa mesin sehingga bisa dieksekusi atau dijalankan
Explanation
The correct answer is "proses merubah source code ke bahasa mesin sehingga bisa dieksekusi atau dijalankan." This is because the process of compiling involves translating the source code written in a high-level programming language into machine code, which can be executed by the computer. This transformation allows the program to be run and perform its intended tasks.
4.
Di bawah ini adalah compiler bahasa C, kecuali ….
Correct Answer
E. C++ compiler for widows
5.
Bagian dari program yang akan diabaikanoleh compiler adalah….
Correct Answer
E. Komentar
Explanation
Komentar adalah bagian dari program yang tidak akan diproses oleh compiler. Komentar digunakan untuk memberikan penjelasan atau catatan dalam kode program, namun tidak akan mempengaruhi eksekusi program. Compiler akan mengabaikan komentar saat melakukan kompilasi dan menghasilkan output program yang akhir.
6.
Keyworddalam bahasa C berjumlah ….
Correct Answer
D. 32
Explanation
The correct answer is 32 because the question is asking for the number of keywords in the C programming language. C has a total of 32 keywords, including "if," "else," "for," "while," and "return," among others. These keywords have predefined meanings and cannot be used as variable names or identifiers in the program.
7.
Penulisan #include <iostream.h> pada source code bahasa C, berfungsi untuk ….
Correct Answer
B. Memberitahukan preprocessor kompiler untuk menyertakan header file standard iostream
Explanation
The correct answer is "memberitahukan preprocessor kompiler untuk menyertakan header file standard iostream". This is because the #include directive is used in C++ to include the header file "iostream", which provides input and output stream objects such as cin and cout. The preprocessor will replace the #include directive with the contents of the specified header file before compiling the program.
8.
Suatu nilai yang tidak dapat diubah selama proses program berlangsung adalah ….
Correct Answer
A. Konstanta
Explanation
A value that cannot be changed during the execution of a program is called a constant. Unlike variables, which can be assigned new values, constants remain the same throughout the program. This allows programmers to define fixed values that are used repeatedly in their code, providing clarity and maintainability.
9.
Karakter khusus “\n”dalam bahasa C, artinya adalah ….
Correct Answer
B. Ganti baris baru (new line)
Explanation
The special character "“" in the C language represents a new line. This character is used to indicate the end of a line and move the cursor to the beginning of the next line when printing or displaying text. It is commonly used to format text and create line breaks in output.
10.
Karakter khusus untuk ganti halaman (form feed) dalam bahasa C adalah ….
Correct Answer
E. \f
Explanation
The correct answer is \f. In the C programming language, \f is the escape sequence for the form feed character, which is used to advance the printer to the next page. This character is commonly used for formatting purposes in printing and displaying text.
11.
Dalam bahasa C, variable adalah ….
Correct Answer
C. Suatu pengenal (identifier) yang digunakan untuk mewakili suatu nilai tertentu di dalam proses program
Explanation
The correct answer is "suatu pengenal (identifier) yang digunakan untuk mewakili suatu nilai tertentu di dalam proses program". In the C programming language, a variable is used to represent a specific value within the program. It acts as an identifier that can be assigned a value and manipulated throughout the program's execution. Variables can hold different types of data, such as integers, characters, or floating-point numbers, and their values can be changed during the program's execution.
12.
Di bawah ini adalah operator matematika yang digunakan dalam bahasa C, kecuali ….
Correct Answer
D. :
Explanation
The correct answer is ":". This is because ":" is not a valid mathematical operator in the C programming language. The other operators listed, "*", "/", "%", and "+", are all commonly used in mathematical operations in C.
13.
Output yang dihasilkan untuk operasi 9%5 dalam bahasa C adalah ….
Correct Answer
E. 4
Explanation
The output of the operation 9%5 in the C language is 4. The % operator in C is the modulus operator, which returns the remainder of the division between two numbers. In this case, when 9 is divided by 5, the remainder is 4.
14.
Outputyang dihasilkan dari operasi a = 5 + 7 % 2 adalah ….
Correct Answer
B. 6
Explanation
The output of the operation a = 5 + 7 % 2 is 6. This is because the % operator represents the modulo operation, which calculates the remainder of the division. In this case, 7 divided by 2 equals 3 with a remainder of 1. Therefore, the expression becomes 5 + 1, resulting in a value of 6 for the variable a.
15.
Tipe data dengan range / jangkauannya - 3.4E-38 s/d 3.4E+38 adalah ….
Correct Answer
A. Float
Explanation
The correct answer is float because the given range (-3.4E-38 s/d 3.4E+38) corresponds to the range of values that can be stored in a float data type. Float is a data type used to represent decimal numbers with single precision, meaning it can store values with a smaller range and less precision compared to double data type.
16.
Di bawah ini adalah hal-hal yang berkaitan dengan fungsi getchar (), kecuali ….
Correct Answer
D. Karakter yang dimasukkan tidak akan ditampilkan
Explanation
The explanation for the given correct answer is that the getchar() function is used to read a single character from the input stream, but it does not display the character on the screen. It only reads the character and stores it in a variable for further use in the program. The other options mentioned in the question are all related to the functionality of the getchar() function, except for this one.
17.
Perhatikan bentuk umum untuk mengatur tampilan bilangan pecahan (float) di bawah ini
printf(“%m.nf”, argument);
Huruf “n” pada coding tersebut berfungsi untuk ….
Correct Answer
B. Menyatakan jumlah digit di belakang koma
Explanation
The letter "n" in the coding is used to indicate the number of digits to be displayed after the decimal point in a floating-point number.
18.
Pada perulangan dengan menggunakan “while”, proses akan terus berlanjut selama kondisinya bernilai ….
Correct Answer
B. True
Explanation
In a while loop, the loop will continue as long as the condition is true. Therefore, the correct answer is "true".
19.
Perhatikan bentuk umum perulangan dengan menggunakan “For” di bawah ini.
for(inisialisasi; syarat; penambahan)
pernyataan;“
inisialisasi” dalam listing di atas mempunyai tujuan untuk ….
Correct Answer
A. Pernyataan untuk menyatakan keadaan awal dari variabel control
Explanation
The "inisialisasi" in the given code is intended to state the initial condition or value of the control variable. This is important because it sets the starting point for the loop and determines how many times the loop will be executed. By initializing the control variable, the loop can begin executing from a specific point and follow the desired pattern or sequence.
20.
Suatu variabel yang berisi alamat memori dari suatu variabel lain adalah ….
Correct Answer
E. Pointer
Explanation
A pointer is a variable that holds the memory address of another variable. In this case, the question is asking for the variable that holds the memory address of another variable. Therefore, the correct answer is pointer.