Bài tập trắc nghiệm môn Sinh học Lớp 11
Câu 1: Chọn khai báo đúng :
a) Var A: array[1.10] of integer; c) Var A:= array[1.10] of integer;
b) Var A= array[1.10] of integer; d) Var A: array[1,10] of integer;
Câu 2: Cho khai báo
Var A: Array[1.4] of Real
i : Integer ;
Ðể nhập dữ liệu cho A, chọn câu nào :
a) Write(‘ Nhập A:’); Readln(A)
b) For i:=1 to 4 do Readln(‘ Nhập A[‘, i, ‘]:’);
c) For i:=1 to 4 do Begin Write(‘ Nhập A[‘, i, ‘]:’); Readln(A[i]); End;
d) For i:=1 to 4 do Write(‘ Nhập A[‘, i, ‘]:’); Readln(A[i]);
Câu 3: Cho khai báo biến :
Var A : array[1.5] of Integer;
a) A[1] := 4/2 ; b) A[2] := -6 ; c) A(3) := 6 ; d) A := 10 ;
Hãy chọn phép toán gán đúng?
Câu 4: Khai báo nào đúng :
a) Var A : array[1.n,1.m] of integer; b) Const n=2; m=3; Var A: array[1.n,1.m] of integer;
c) Var A: array[3, 2] of Integer; d) Var n, m : integer ; A: array[1.n,1.m] of integer;
BÀI TẬP TRẮC NGHIỆM
Câu 1: Chọn khai báo đúng :
a) Var A: array[1..10] of integer; c) Var A:= array[1..10] of integer;
b) Var A= array[1..10] of integer; d) Var A: array[1,10] of integer;
Câu 2: Cho khai báo
Var A: Array[1..4] of Real
i : Integer ;
Ðể nhập dữ liệu cho A, chọn câu nào :
a) Write(‘ Nhập A:’); Readln(A)
b) For i:=1 to 4 do Readln(‘ Nhập A[‘, i, ‘]:’);
c) For i:=1 to 4 do Begin Write(‘ Nhập A[‘, i, ‘]:’); Readln(A[i]); End;
d) For i:=1 to 4 do Write(‘ Nhập A[‘, i, ‘]:’); Readln(A[i]);
Câu 3: Cho khai báo biến :
Var A : array[1..5] of Integer;
a) A[1] := 4/2 ;
b) A[2] := -6 ;
c) A(3) := 6 ;
d) A := 10 ;
Hãy chọn phép toán gán đúng?
Câu 4: Khai báo nào đúng :
a) Var A : array[1..n,1..m] of integer;
b) Const n=2; m=3; Var A: array[1..n,1..m] of integer;
c) Var A: array[3, 2] of Integer;
d) Var n, m : integer ; A: array[1..n,1..m] of integer;
Câu 5: Cho khai báo :
Var A : array[1..2,1..3] of Real;
i, j : integer;
Ðể nhập dữ liệu cho ma trận A, chọn
a) Write(‘ Nhập A:’); Readln(A) ;
b) For i:=1 to 2 do Readln(A[i, j]);
c) For i:=1 to 2 do
For j:=1 to 3 do
begin
write(‘Nhập A[‘, i, j, ‘]:’);
readln(A[i, j]);
end;
d) For i:=1 to 2 do
For j:=1 to 3 do
write(‘Nhập A[‘, i, j, ‘]:’);
readln(A[i, j]);
Câu 6: Cho khai báo :
Var A : array[1..2,1..3] of Real;
i, j : integer; Max : Real;
Ðể tìm số lớn nhất của ma trận A, chọn câu nào:
a) Max:=A[1,1];
If Max < A[i,j] then Max:=A[i,j];
b) Max:=A[1,1];
For i:=1 to 2 do
if Max < A[i,j] then Max:=A[i,j];
c) A[1,1]:=Max ;
For i:=1 to 2 do
For j:=1 to 3 do
if Max< A[i,j] then A[i,j]:=Max;
d) Max:=A[1,1];
For i:=1 to 2 do
For j:=1 to 3 do
if Max < A[i,j] then Max:=A[i,j];
Câu 7: Cho biến SS kiểu lôgic. Lệnh nào làm SS có gía trị là TRUE :
a) SS := 'a' < 'A';
b) SS := 'A' = 'a';
c) SS := 'an' < 'a';
d) SS := 'PASCAL' < 'pascal';
Câu 8: Cho St là biến xâu, sau khi thực hiện hai lệnh :
St:= Copy( 'PASCAL VERSION 5.5' , 8, 7) ;
Write(St);
- Kết qủa in lên màn hình là:
a) VERSION 5.5
b) VERSION
c) PASCAL
d) 5.5
Câu 9: Cho St là biến xâu, sau khi thực hiện bốn lệnh:
St:=’ABCDEF’;
Delete(St, 3, 2);
Insert(‘XYZ’, St, 2);
Write(St);
-Kết qủa in lên màn hình là:
a) ABXYZEF
b) AXYZBCDEF
c) AXYZ
d) AXYZBEF
Câu 10: Cho các biến xâu St và k nguyên. Sau khi gán:
St:='Sinh vien Tin hoc hoc Tin hoc';
k := Pos('Tin', ST) ;
- Gía trị của k là
a) k=13
b) k=11
c) k=26
d) k=23
Câu 11: Khi chạy chương trình :
Var St : string;
i, L : integer;
Begin
St :='Hom nay thuc tap'; L:=Length(St);
For i := 1 to L do
If (St[i] >= 'a') and (St[i] <= 'z') then St[i]:= Upcase (St[i]);
Write (St);
End.
-Chương trình in ra :
a) Hom Nay Thuc Tap
c) Hom nay thuc tap
b) hom nay thuc tap
d) HOM NAY THUC TAP
Câu 12: Cho St là biến xâu và St:=’AAABAAB’;
Sau khi thực hiện hai lệnh :
While St[1]=’A’ do Delete(St,1,1);
Write(St);
Kết qủa in ra là:
a) AABAAB
b) BAAB
c) BB
d) AAA
Câu
1
2
3
4
5
6
7
8
9
10
11
12
Đ/A
File đính kèm:
BÀI TẬP TRẮC NGHIỆM 11.doc



