100
|
Quyida keltirilgan dastur qismi ishi natijasida
int i=2;
switch (i)
{ case 1: i += 2;
case 2: i *= 3;
case 6: i /= 2;
default: ; }
|
1
|
5
|
LO3
|
|
A
|
o’zgaruvchi i ning qiymati 3 teng bo’ladi
|
|
|
|
|
B
|
o’zgaruvchi i ning qiymati 6 teng bo’ladi
|
|
|
|
|
C
|
o’zgaruvchi i ning qiymati o’zgarmasdan qoladi
|
|
|
|
|
D
|
o’zgaruvchi i ning qiymati 1 teng bo’ladi
|
|
|
|
101
|
|
C++ dasturlash tilida ishlatiladigan takrorlanuvchi operatorlar tog’ri ko’rsatilgan javobni tanlang
|
1
|
3
|
LO2
|
|
A
|
for,while,do while
|
|
|
|
|
B
|
cout, getch, return
|
|
|
|
|
C
|
while, NULL, type
|
|
|
|
|
D
|
cin, gets, char
|
|
|
|
102
|
|
"while (ifoda_shart) {…}" konstruksiyadan foydalanish nimani bildiradi?
|
1
|
4
|
LO2
|
|
A
|
Avval shartga tekshiriluvchi tsikl
|
|
|
|
|
B
|
Amal bajarilgandan so’ng shartga tekshiriluvchi sikl
|
|
|
|
|
C
|
Ko’p alternativli to’plam
|
|
|
|
|
D
|
parametrik tsikl
|
|
|
|
103
|
|
Agar continue operatori tsikl operatori ichida kelsa, u xolda:
|
1
|
3
|
LO2
|
|
A
|
u boshqaruvni tsiklning kelasi iterasiyasining boshlanishiga uzatadi
|
|
|
|
|
B
|
u boshqaruvni tsiklning oldingi iterasiyasining oxiriga uzatadi
|
|
|
|
|
C
|
u boshqaruvni belgidan keyin kelgan tsikl iterasiyasiga uzatadi
|
|
|
|
|
D
|
u boshqaruvni tsikldan keyingi operatorga uzatadi
|
|
|
|
104
|
|
Quyidagi dastur natijasida a nechchiga teng bo’ladi?
int a = 10, n = 6;
for(int i = 0; i < n; i ++) a += i;
|
1
|
3
|
LO2
|
|
A
|
25
|
|
|
|
|
B
|
30
|
|
|
|
|
C
|
35
|
|
|
|
|
D
|
20
|
|
|
|
105
|
|
Takrorlash operatori to’g’ri berilgan qatorni ko’rsating
1.if then else
2.for( int i=1;i<10 ;i++ ) if (a<0) break; else cin>> a;
3.for(sikl_par>:=; shart ;)
4.for( ; ; ) if (a<0) break; else {s +=a; cin>> a;}
5.for(sikl_par >:=< boshl_qiym > ) downto ; do
|
1
|
3
|
LO2
|
|
A
|
2,4
|
|
|
|
|
B
|
2, 3
|
|
|
|
|
C
|
3, 4
|
|
|
|
|
D
|
1, 2
|
|
|
|
106
|
|
Ekranga qanday natija chiqariladi?
int s = 0; for (int i = 0; i<= 7; i++)
s=s+i;
sout<
|
1
|
3
|
LO2
|
|
A
|
28
|
|
|
|
|
B
|
22
|
|
|
|
|
C
|
25
|
|
|
|
|
D
|
20
|
|
|
|
107
|
|
Dastur bajarilganidan so’ng k qiymati nechaga teng bo’ladi?
k=1; while (k<10) k=k+k; sout<< k;
|
1
|
4
|
LO2
|
|
A
|
16
|
|
|
|
|
B
|
4
|
|
|
|
|
C
|
32
|
|
|
|
|
D
|
8
|
|
|
|
108
|
|
So'ngra tekshirish sikl operatorini to’g’ri e’lon qilinganini ko’rsating
|
1
|
5
|
LO2
|
|
A
|
do while
|
|
|
|
|
B
|
for
|
|
|
|
|
C
|
switch
|
|
|
|
|
D
|
while
|
|
|
|
109
|
|
Qaysi konstruksiya yordamida parametrik tsikl tavsiya etiladi?
|
1
|
3
|
LO2
|
|
A
|
for(ifoda_1;ifoda_shart; ifoda_2) {…}
|
|
|
|
|
B
|
do {…} while (ifoda_shart)
|
|
|
|
|
C
|
while (ifoda_shart) {…}
|
|
|
|
|
D
|
if (ifoda_shart) {…} else {…}
|
|
|
|
110
|
|
Kod fragmenti bajarilgandan so’ng o’zgaruvchi x ni qiymatini toping;
int x=0, y=0;
while(y<10)
y=3*(++x)+1;
|
1
|
4
|
LO2
|
|
A
|
3
|
|
|
|
|
B
|
1
|
|
|
|
|
C
|
4
|
|
|
|
|
D
|
cheksiz sikl
|
|
|
|
111
|
|
Takrorlanuvchi algoritmning necha xil usuli bor?
|
1
|
5
|
LO1
|
|
A
|
3 xil.
|
|
|
|
|
B
|
2 xil.
|
|
|
|
|
C
|
1 xil.
|
|
|
|
|
D
|
4 xil.
|
|
|
|
112
|
|
Sikl tanasi necha marta bajarilishini aniqlang.
int i=0;
do {
i++;
. . .
} while(i/3 >0);
|
1
|
5
|
LO2
|
|
A
|
1
|
|
|
|
|
B
|
2
|
|
|
|
|
C
|
10
|
|
|
|
|
D
|
tsikl umuman ishlamaydi
|
|
|
|
113
|
|
Qaysi operator bitta doimiy ifodadan boshqasiga o'tishga ruxsat bermaydi?
|
1
|
3
|
LO3
|
|
A
|
break;
|
|
|
|
|
B
|
endl;
|
|
|
|
|
C
|
Stop;
|
|
|
|
|
D
|
Nuqta_vergul
|
|
|
|
114
|
|
10> |