Kiểm Tra 1 Tiết Tin 11

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Hieplh
H
Hieplh
Community Contributor
Quizzes Created: 1 | Total Attempts: 428
Questions: 20 | Attempts: 430

SettingsSettingsSettings
Kiểm Tra 1 Tiết Tin 11 - Quiz

.


Questions and Answers
  • 1. 

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

    • A.

      Là một tập hợp các số nguyên;

    • B.

      Độ dài tối đa của mảng là 255;

    • C.

      Là một dãy hữu hạn các phần tử cùng kiểu;

    • D.

      Mảng không thể chứa kí tự;

    Correct Answer
    C. Là một dãy hữu hạn các phần tử cùng kiểu;
    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.

    Rate this question:

  • 2. 

    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:

    • A.

      Khai báo một hằng số là số phần tử của mảng;

    • B.

      Khai báo chỉ số bắt đầu và kết thúc của mảng;

    • C.

      Khai báo chỉ số kết thúc của mảng;

    • D.

      Không cần khai báo gì, hệ thống sẽ tự xác định;

    Correct Answer
    B. Khai báo chỉ số bắt đầu và kết thúc của mảng;
    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.

    Rate this question:

  • 3. 

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

    • A.

      Dùng để truy cập đến một phần tử bất kì trong mảng;

    • B.

      Dùng để quản lí kích thước của mảng;

    • C.

      Dùng trong vòng lặp với mảng;

    • D.

      Dùng trong vòng lặp với mảng để quản lí kích thước của mảng;

    Correct Answer
    A. Dùng để truy cập đến một phần tử bất kì trong mảng;
    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.

    Rate this question:

  • 4. 

    Phương án nào dưới đây là khai báo mảng hợp lệ?

    • A.

      Mang : ARRAY[0..10] OF INTEGER;

    • B.

      Mang : ARRAY[0..10] : INTEGER;

    • C.

      Mang : INTEGER OF ARRAY[0..10];

    • D.

      Mang : ARRAY(0..10) : INTEGER;

    Correct Answer
    A. Mang : ARRAY[0..10] OF INTEGER;
    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.

    Rate this question:

  • 5. 

    Which one do you like?

    • A.

      For k := 16 down to 0 write(a[k]);

    • B.

      For k:= 0 to 15 do write(a[k]);

    • C.

      For k := 16 downto 0 do write(a[k]);

    • D.

      For k := 1 to 16 do write(a[k]);

    Correct Answer
    C. For k := 16 downto 0 do write(a[k]);
    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.

    Rate this question:

  • 6. 

    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?

    • A.

      A[10]

    • B.

      A(10)

    • C.

      A[9]

    • D.

      A(9)

    Correct Answer
    C. A[9]
    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.

    Rate this question:

  • 7. 

    Hãy chọn phương án ghép đúng. Độ dài tối đa của xâu kí tự trong PASCAL là:

    • A.

      256

    • B.

      255

    • C.

      365535

    • D.

      Tùy ý

    Correct Answer
    B. 255
    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.

    Rate this question:

  • 8. 

    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à:

    • A.

      12

    • B.

      13

    • C.

      14

    • D.

      15

    Correct Answer
    B. 13
    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.

    Rate this question:

  • 9. 

    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à:

    • A.

      5

    • B.

      6

    • C.

      7

    • D.

      8

    Correct Answer
    C. 7
    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.

    Rate this question:

  • 10. 

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

    • A.

      Câu lệnh sai vì thiếu độ dài tối đa của xâu;

    • B.

      Xâu có độ dài lớn nhất là 0;

    • C.

      Xâu có độ dài lớn nhất là 255;

    • D.

      Cần phải khai báo kích thước của xâu sau đó;

    Correct Answer
    C. Xâu có độ dài lớn nhất là 255;
    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.

    Rate this question:

  • 11. 

    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

    • A.

      Chèn xâu S1 vào S2 bắt đầu từ vị trí vt

    • B.

      Chèn xâu S2 vào S1 bắt đầu từ vị trí vt

    • C.

      Nối xâu S2 vào S1

    • D.

      Sao chép vào cuối S1 một phần của S2 từ vị trí vt ;

    Correct Answer
    A. Chèn xâu S1 vào S2 bắt đầu từ vị trí vt
    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.

    Rate this question:

  • 12. 

    Đ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.

    • A.

      6

    • B.

      7

    • C.

      10

    • D.

      12

    Correct Answer
    A. 6
    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.

    Rate this question:

  • 13. 

    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]) ;

    • A.

      In xâu ra màn hình;

    • B.

      In từng kí tự xâu ra màn hình;

    • C.

      In từng kí tự ra màn hình theo thứ tự ngược, trừ kí tự đầu tiên;

    • D.

      In từng kí tự ra màn hình theo thứ tự ngược;

    Correct Answer
    D. In từng kí tự ra màn hình theo thứ tự ngược;
    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.

    Rate this question:

  • 14. 

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

    • A.

      Mảng một chiều là một dãy hữu hạn các số nguyên.

    • B.

      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.

    • C.

      Có thể dùng bất cứ một kiểu dữ liệu chuẩn nào để đánh chỉ số cho các phần tử của mảng một chiều.

    • D.

      Khi xây dựng kiểu mảng một chiều, người lập trình không cần khai báo kiểu dữ liệu của phần tử của mảng.

    Correct Answer
    B. 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.
    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.

    Rate this question:

  • 15. 

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

    • A.

      Mỗi phần tử của mảng một chiều đều được đánh chỉ số, được chỉ định nhờ chỉ số tương ứng của nó.

    • B.

      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ử.

    • C.

      Trong khai báo xây dựng kiểu mảng một chiều, có thể biết được cách đánh chỉ số cho các phần tử của mảng.

    • D.

      Chỉ số được đánh tuần tự, liên tiếp cho các phần tử kề nhau của mảng một chiều, từ phần tử đầu tiên cho đến phần tử cuối.

    Correct Answer
    B. 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ử.
    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.

    Rate this question:

  • 16. 

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

    • A.

      Xâu là một dãy các kí tự trong bảng mã ASCII. Kiểu xâu là một kiểu dữ liệu có cấu trúc.

    • B.

      Có thể xem mỗi xâu có cấu trúc giống như một mảng một chiều mà mỗi phần tử của mảng là một kí tự trong bảng mã ASCII, được đánh chỉ số từ 1.

    • C.

      Số lượng kí tự trong một xâu chính là độ dài của xâu.

    • D.

      Các phép toán thao tác với xâu tương tự như các phép toán thao tác với mảng.

    Correct Answer
    D. Các phép toán thao tác với xâu tương tự như các phép toán thao tác với mảng.
    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.

    Rate this question:

  • 17. 

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

    • A.

      'MOOR' < 'LOOK'

    • B.

      'MATHEMATIC' < 'LOOK'

    • C.

      'AB123CD' < ' '

    • D.

      'MOOR' < 'MOORK'

    Correct Answer
    D. 'MOOR' < 'MOORK'
    Explanation
    The answer is 'MOOR' < 'MOORK' because in lexicographic order, 'MOOR' comes before 'MOORK'. In this order, the comparison is made character by character from left to right, and 'R' is less than 'K', so 'MOOR' is considered smaller than 'MOORK'.

    Rate this question:

  • 18. 

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

    • A.

      'ABCDOR' < 'ABDOR'

    • B.

      'MOOR' < 'LOOK'

    • C.

      'AB123CD' < 'ABCDAB'

    • D.

      'MOOR' < 'MOORK'

    Correct Answer
    B. 'MOOR' < 'LOOK'
    Explanation
    The correct answer is 'MOOR' < 'LOOK'. In lexicographic order, 'M' comes after 'L', so 'MOOR' is greater than 'LOOK'. Therefore, the expression 'MOOR' < 'LOOK' evaluates to FALSE.

    Rate this question:

  • 19. 

    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?

    • A.

      Type 1chieu=array[1..100] of char;

    • B.

      Type mang=array[1-100] of char;

    • C.

      Type mang1c=array(1..100) of char;

    • D.

      Type mang1c=array[1..100] of char;

    Correct Answer
    D. Type mang1c=array[1..100] of char;
    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").

    Rate this question:

  • 20. 

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

    • A.

      Các phần tử của mảng một chiều được sắp thứ tự theo chỉ số;

    • B.

      Các phần tử của mảng một chiều được sắp thứ tự theo giá trị giảm dần;

    • C.

      Các phần tử của mảng một chiều được sắp thứ tự theo giá trị tăng dần;

    • D.

      Các phần tử của mảng một chiều không sắp thứ tự.

    Correct Answer
    A. Các phần tử của mảng một chiều được sắp thứ tự theo chỉ số;
    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.

    Rate this question:

Quiz Review Timeline +

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

  • Current Version
  • Mar 14, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Mar 23, 2016
    Quiz Created by
    Hieplh
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.