Kiểm Tra 1 Tiết Tin 11

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 Hieplh
H
Hieplh
Community Contributor
Quizzes Created: 1 | Total Attempts: 433
| Attempts: 433 | Questions: 20
Please wait...
Question 1 / 20
0 %
0/100
Score 0/100
1. Hãy chọn phương án ghép đúng. Độ dài tối đa của xâu kí tự trong PASCAL là:

Explanation

The correct answer is 255. In Pascal, the maximum length of a string is determined by the size of the string type declaration. In Pascal, a string is declared with a fixed size, and the maximum size is 255 characters. Therefore, the maximum length of a string in Pascal is 255 characters.

Submit
Please wait...
About This Quiz
Kiểm Tra 1 Tiết Tin 11 - Quiz

.

Tell us your name to personalize your report, certificate & get on the leaderboard!
2. Phương án nào dưới đây là khai báo mảng hợp lệ?

Explanation

The correct answer is "mang : ARRAY[0..10] OF INTEGER;". This is the correct declaration of an array in Pascal, where "mang" is the name of the array, "[0..10]" represents the range of indices for the array (from 0 to 10), and "INTEGER" specifies the type of data that the array will store.

Submit
3. Hãy chọn phương án ghép đúng. Cho xâu S là 'Hanoi-Vietnam'. Kết quả của hàm Length(S) là:

Explanation

The correct answer is 13 because the function Length(S) returns the number of characters in the string S. The string "Hanoi-Vietnam" has a length of 13 characters, including the hyphen.

Submit
4. Hãy chọn phương án ghép đúng nhất. Thủ tục chuẩn Insert(S1,S2,vt) thực hiện

Explanation

The correct answer is "chèn xâu S1 vào S2 bắt đầu từ vị trí vt". This is because the procedure "Insert(S1,S2,vt)" is used to insert string S1 into string S2 starting from position vt.

Submit
5. Hãy chọn phương án ghép đúng nhất. Để khai báo số phần tử của mảng trong PASCAL, người lập trình cần:

Explanation

To declare the number of elements in a Pascal array, the programmer needs to declare the starting and ending indices of the array. This is because in Pascal, arrays are declared with a specific range of indices, and the number of elements in the array is determined by the difference between the starting and ending indices, plus one. Therefore, declaring the starting and ending indices of the array is necessary to determine the size of the array.

Submit
6. Hãy chọn phương án ghép đúng. Cho xâu S là 'Hanoi-Vietnam'. Kết quả của hàm Pos('Vietnam',S)là:

Explanation

The function Pos('Vietnam', S) returns the position of the first occurrence of the string 'Vietnam' within the string S. In this case, the string S is 'Hanoi-Vietnam'. The function will search for the string 'Vietnam' within S and return the position of its first occurrence. Since 'Vietnam' starts at the 7th position in 'Hanoi-Vietnam', the correct answer is 7.

Submit
7. Cho khai báo sau:
       VAR st: STRING;Phát biểu nào sau đây là đúng?

Explanation

The correct answer is "Xâu có độ dài lớn nhất là 255" because it states that the maximum length of the string is 255 characters. This means that any string declared using the variable "st" can have a maximum length of 255 characters.

Submit
8. Biểu thức quan hệ nào dưới đây cho giá trị FALSE?

Explanation

The correct answer is 'MOOR'

Submit
9. Cho str là một xâu kí tự, đoạn chương trình sau thực hiện công việc gì?
            for  i := length(str) downto 1 do                       write(str[i]) ;

Explanation

The given code snippet iterates through the characters of the string "str" in reverse order, starting from the last character and going up to the first character. It then prints each character to the screen. Therefore, the code will output each character of the string in reverse order.

Submit
10. Đoạn chương trình sau in ra kết quả nào?Program Welcome ;Var a : string[10];Begin       a := 'tinhoc';       writeln(length(a));End.

Explanation

The program initializes a variable "a" with the value "tinhoc" and then uses the "length" function to determine the length of the string. The length of the string "tinhoc" is 6 characters, so the program will output 6.

Submit
11. Phát biểu nào sau đây là đúng?

Explanation

The correct answer is "Mảng một chiều là một dãy hữu hạn các phần tử cùng kiểu dữ liệu." This statement is correct because an array is a finite sequence of elements that are of the same data type. In an array, all elements must have the same data type, whether it is integers, characters, or any other standard data type. This ensures that the elements in the array can be accessed and manipulated consistently.

Submit
12. Biểu thức quan hệ nào dưới đây cho giá trị TRUE?

Explanation

The answer is 'MOOR'

Submit
13. Hãy chọn phương án hợp lý nhất. Trong ngôn ngữ lập trình Pascal

Explanation

The correct answer states that in the Pascal programming language, the elements of a one-dimensional array are sorted according to their index. This means that the elements are arranged in the order of their position within the array, starting from index 0 and increasing sequentially. The other options mention sorting the elements based on their values, either in descending or ascending order, but this is not the case in Pascal. Therefore, the correct answer is that the elements of a one-dimensional array in Pascal are sorted according to their index.

Submit
14. Phát biểu nào dưới đây về kiểu mảng là phù hợp?

Explanation

The statement "Là một dãy hữu hạn các phần tử cùng kiểu" is the correct answer because it accurately describes an array. An array is a finite sequence of elements of the same type. The other statements in the question do not fully define an array. The fact that an array can contain a set of integers or have a maximum length of 255 does not encompass the complete definition of an array. Additionally, the statement that an array cannot contain characters is incorrect, as arrays can hold elements of any type, including characters.

Submit
15. Which one do you like?

Explanation

The correct answer is "for k := 16 downto 0 do write(a[k]);". This answer is correct because it uses the correct syntax for a loop that iterates from 16 down to 0. The keyword "downto" is used to specify the direction of the loop, and the variable "k" is initialized to 16 and decremented by 1 with each iteration. The statement "write(a[k]);" is used to output the value of the array element at index k.

Submit
16. Trong ngôn ngữ lập trình Pascal, về mặt cú pháp câu lệnh nào sau đây là đúng?

Explanation

The correct answer is "Type mang1c=array[1..100] of char;" because it follows the correct syntax for declaring an array in Pascal. The keyword "Type" is used to declare a new type, followed by the name of the type (in this case "mang1c"), the keyword "array", the range of indices (in this case "1..100"), and the type of elements in the array (in this case "char").

Submit
17. Phát biểu nào dưới đây về chỉ số của mảng là phù hợp nhất?

Explanation

This statement is the most appropriate explanation because it accurately describes the purpose of an index in an array. An index is used to access any element in an array, allowing for easy retrieval and manipulation of specific elements. The other statements mention managing the size of the array and using it in loops, but they do not specifically address the purpose of an index.

Submit
18. Phát biểu nào sau đây là sai?

Explanation

The statement "Với khai báo xây dựng kiểu mảng một chiều, không thể biết được mảng chứa tối đa bao nhiêu phần tử" is correct because when declaring and constructing a one-dimensional array, we do not specify the maximum number of elements that the array can contain. The size of the array can be determined dynamically at runtime based on the program's needs. Therefore, it is not possible to know the maximum number of elements that the array can hold beforehand.

Submit
19. Phát biểu nào dưới đây là sai?

Explanation

The statement is correct. It states that the operations performed on strings are similar to the operations performed on arrays. This means that strings can be accessed, modified, and manipulated in a similar way to arrays.

Submit
20. Cho khai báo mảng như sau:
            VAR m: ARRAY[0..10] of Integer;
Phương án nào dưới đây chỉ phần tử thứ 10 của mảng?

Explanation

The correct answer is a[9] because arrays in most programming languages are zero-indexed, which means the first element of the array is at index 0. Therefore, the tenth element of the array would be at index 9.

Submit
View My Results

Quiz Review Timeline (Updated): Jul 22, 2024 +

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

  • Current Version
  • Jul 22, 2024
    Quiz Edited by
    ProProfs Editorial Team
  • Mar 23, 2016
    Quiz Created by
    Hieplh
Cancel
  • All
    All (20)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
Hãy chọn phương án ghép đúng....
Phương án nào dưới đây là khai...
Hãy chọn phương án ghép đúng. Cho...
Hãy chọn phương án ghép đúng...
Hãy chọn phương án ghép đúng...
Hãy chọn phương án ghép đúng....
Cho khai báo sau:       VAR...
Biểu thức quan hệ nào dưới đây cho giá...
Cho str là một xâu kí tự, đoạn chương...
Đoạn chương trình sau in ra kết quả nào?Program...
Phát biểu nào sau đây...
Biểu thức quan hệ nào dưới đây cho giá...
Hãy chọn phương án hợp lý nhất. Trong...
Phát biểu nào dưới đây về kiểu mảng...
Which one do you like?
Trong ngôn ngữ lập trình Pascal, về mặt cú...
Phát biểu nào dưới đây về chỉ số của...
Phát biểu nào sau đây là sai?
Phát biểu nào dưới đây là sai?
Cho khai báo mảng như...
Alert!

Advertisement