Ushbu kodni bajargandan so'ng a o'zgaruvchisi nimaga teng bo'ladi?
int a; for(a = 0; a < 10; a++) {}
1
|
3
|
LO2
|
|
A
|
10
|
|
|
|
|
B
|
9
|
|
|
|
|
C
|
1
|
|
|
|
|
D
|
11
|
|
|
|
115
|
|
Quyidagi operatorlarning qaysi biri C ++ da takrorlanuvchi operator emas?
|
1
|
3
|
LO2
|
|
A
|
repeat until
|
|
|
|
|
B
|
do while
|
|
|
|
|
C
|
for
|
|
|
|
|
D
|
while
|
|
|
|
116
|
|
Har qanday tsikl tanasi uning holati qadar davom etadi,qachonki ...
|
1
|
4
|
LO2
|
|
A
|
Yolg’on bo’lguncha
|
|
|
|
|
B
|
Takrorlanishda shart yoq
|
|
|
|
|
C
|
Rost
|
|
|
|
|
D
|
Dastur chiqib ketguncha
|
|
|
|
117
|
|
Sikl tanasi necha marta bajarilishini aniqlang
int i ;
for (i=7; i%3>1; --i)
{ . . .
}
|
1
|
3
|
LO2
|
|
A
|
bir marta ham bajarilmaydi
|
|
|
|
|
B
|
2
|
|
|
|
|
C
|
1
|
|
|
|
|
D
|
cheksiz sikl
|
|
|
|
118
|
|
bu qanday blok?
|
1
|
4
|
LO2
|
|
A
|
Parametrli takrorlanuvchi bloki .
|
|
|
|
|
B
|
Shart berish vazifasini amalga oshiradigan blok.
|
|
|
|
|
C
|
Qism dasturini ifodalovchi blok.
|
|
|
|
|
D
|
Natijani chop etish uchun ishlatiladigan blok.
|
|
|
|
119
|
|
Qaysi operator yordamida dinamik xotira o’chiriladi?
|
2
|
7
|
LO4
|
|
A
|
delete
|
|
|
|
|
B
|
new
|
|
|
|
|
C
|
continue
|
|
|
|
|
D
|
break
|
|
|
|
120
|
|
while (n>0) { s*=n; n-=2;} n=5 da dasturdagi
s ning qiymatini aniqlang ?
|
1
|
4
|
LO2
|
|
A
|
15
|
|
|
|
|
B
|
20
|
|
|
|
|
C
|
5
|
|
|
|
|
D
|
25
|
|
|
|
121
|
|
... – o’z nomiga ega bo’lgan bir xil nbgkb elementlarning tartiblangan to’plami.
|
2
|
7
|
LO4
|
|
A)
|
Massiv
|
|
|
|
|
B)
|
Struktura
|
|
|
|
|
C)
|
Birlashma
|
|
|
|
|
D)
|
O’zgaruvchi
|
|
|
|
122
|
|
Massiv to’g’ri e’lon qilingan qatorni ko’rsating.
|
2
|
7
|
LO4
|
|
A)
|
int anarray[10];
|
|
|
|
|
B)
|
anarray{10};
|
|
|
|
|
C)
|
array an array[10];
|
|
|
|
|
D)
|
int anarray;
|
|
|
|
123
|
|
Quyidagi dasturni bajarilish natijasida nima ekranda hosil bo’ladi?
#include
int main()
{
int sum = 0;
int array[3][3] = {{0, 1, 2}, {3, 4, 5}, {6, 7, 8}};
for (int i = 0; i < 3 ; ++i)
{
for (int j = 2; j < 3 ; j++)
{
sum += array[i][j];
}
}
std::cout << sum << std::endl;
return 0;
}
|
2
|
7
|
LO4
|
|
A)
|
15
|
|
|
|
|
B)
|
36
|
|
|
|
|
C)
|
21
|
|
|
|
|
D)
|
9
|
|
|
|
124
|
|
Qaysi javob variantida ikki o’lchovli massiv e’lon qilingan?
|
2
|
7
|
LO4
|
|
A)
|
int anarray[20][20];
|
|
|
|
|
B)
|
array anarray[20][20];
|
|
|
|
|
C)
|
char array[20];
|
|
|
|
|
D)
|
int array[20, 20];
|
|
|
|
125
|
|
Mazkur dastur nimani topadi?
#include
int main()
{
int i, res = 0, f [20];
for (i = 0; i < 20; i++)
scanf ("%d", &f[i] );
for (i = 1; i < 20; i++ )
if (f[res]>f[i])
res = i;
printf ("%d", res ); return 0;
}
|
2
|
7
|
LO4
|
|
A)
|
Minimal element indeksini;
|
|
|
|
|
B)
|
Maksimal element indeksini;
|
|
|
|
|
C)
|
Maksimal elementni;
|
|
|
|
|
D)
|
Minimal elementni;
|
|
|
|
126
|
|
Agar C++ tilida bir o’lchovli massiv N elementdan iborat bo’lsa, unda uning indeksi qanday qiymatlarni qabul qiladi?
|
2
|
7
|
LO4
|
|
A)
|
0 dan N-1 gacha
|
|
|
|
|
B)
|
1 dan N gacha
|
|
|
|
|
C)
|
0 dan N gacha
|
|
|
|
|
D)
|
1 dan N+1 gacha
|
|
|
|
127
|
|
O’lchami 10 teng bo’lgan massivning 7 elementiga murojaat qanday amalga oshirildi?
|
2
|
7
|
LO4
|
|
A)
|
mas [6];
|
|
|
|
|
B)
|
mas (7);
|
|
|
|
|
C)
|
mas 8;
|
|
|
|
|
D)
|
mas [7];
|
|
|
|
|