1 Fan bobi – 1; Fan bo‘limi – 1; Qiyinlik darajasi – 1


Manba: Bjarne Stroustrup. The C++ Programming Language (4th Edition). Addison-Wesley, 2013, Bob 2 №91


Download 62.12 Kb.
bet4/7
Sana10.12.2020
Hajmi62.12 Kb.
#163526
1   2   3   4   5   6   7
Bog'liq
Dasтурлаш asoslari TEST (uzb)(1)


Manba: Bjarne Stroustrup. The C++ Programming Language (4th Edition). Addison-Wesley, 2013, Bob 2

91 Fan bobi – 2; Fan bo‘limi – 2.1; Qiyinlik darajasi – 1




Quyidagi ifodaning qiymati to’g’ri ko’rsatilgan javobni toping: 18&14|15-4>>1

7

8

9

10


Manba: Bjarne Stroustrup. The C++ Programming Language (4th Edition). Addison-Wesley, 2013, Bob 2

92 Fan bobi – 2; Fan bo‘limi – 2.1; Qiyinlik darajasi – 1




Quyidagi ifodaning qiymati to’g’ri ko’rsatilgan javobni toping: 13|10^14+5<<2

79

78

75

72


Manba: Bjarne Stroustrup. The C++ Programming Language (4th Edition). Addison-Wesley, 2013, Bob 2

93 Fan bobi – 2; Fan bo‘limi – 2.1; Qiyinlik darajasi – 1




Quyidagi ifodaning qiymati to’g’ri ko’rsatilgan javobni toping: 23^21|11+3>>2

3

2

1

4


Manba: Bjarne Stroustrup. The C++ Programming Language (4th Edition). Addison-Wesley, 2013, Bob 2

94 Fan bobi – 2; Fan bo‘limi – 2.1; Qiyinlik darajasi – 1




Quyidagi ifodaning qiymati to’g’ri ko’rsatilgan javobni toping: 25|20^11-3<<2

61

60

23

24


Manba: Bjarne Stroustrup. The C++ Programming Language (4th Edition). Addison-Wesley, 2013, Bob 2

95 Fan bobi – 2; Fan bo‘limi – 2.1; Qiyinlik darajasi – 1




Quyidagi ifodaning qiymati to’g’ri ko’rsatilgan javobni toping: 13&11^10-6>>2

8

7

6

5


Manba: Bjarne Stroustrup. The C++ Programming Language (4th Edition). Addison-Wesley, 2013, Bob 2

96 Fan bobi – 3; Fan bo‘limi – 3.2; Qiyinlik darajasi – 2




C++ tilida bir yoki har xil turdagi berilganlarni jamlanmasi nima deb ataladi?

struktura

Funksiya

Massiv

Fayl


Manba: Bjarne Stroustrup. The C++ Programming Language (4th Edition). Addison-Wesley, 2013, Bob 2

97 Fan bobi – 3; Fan bo‘limi – 3.2; Qiyinlik darajasi – 1




Struktura maydoniga mujoraat qilish belgisi qaysi qatorda to’g’ri ko’rsatilgan?

Nuqta(.)

Vergul(,)

Nuqtali vergul(;)

Ikki nuqta(:)


Manba: Bjarne Stroustrup. The C++ Programming Language (4th Edition). Addison-Wesley, 2013, Bob 2

98 Fan bobi – 2; Fan bo‘limi – 2.1; Qiyinlik darajasi – 1




Ko’rsatkich orqali aniqlangan struktura elementlariga murojaat vositasi to’g’ri ko’rsatilgan qatorni toping.

->

=

:

::


Manba: Bjarne Stroustrup. The C++ Programming Language (4th Edition). Addison-Wesley, 2013, Bob 7

99 Fan bobi – 4; Fan bo‘limi – 4.1; Qiyinlik darajasi – 1




C++ tilida matn faylini faqat o’qish uchun ochish ifodasi to’g’ri ko’rsatilgan qatorni toping

FILE *f=fopen(“D:\\fayllar\\matn.txt”, “rt”)

FILE f=fopen(“D:\\fayllar\\matn.txt”, “rt”)

FILE *f=fopen(“rt”, “D:\\fayllar\\matn.txt”)

FILE *f=fopen(“D:\\fayllar\\matn.txt”)


Manba: Bjarne Stroustrup. The C++ Programming Language (4th Edition). Addison-Wesley, 2013, Bob 2

100 Fan bobi – 2; Fan bo‘limi – 2.1; Qiyinlik darajasi – 2




C++ tilida quyidagi programma qismi ishlaganda ekranga qanday natija chiqadi?

int a=234;

for (;a>10;)

a/=10;


cout<

2

3

4

0


Manba: Bjarne Stroustrup. The C++ Programming Language (4th Edition). Addison-Wesley, 2013, Bob 2

101 Fan bobi – 2; Fan bo‘limi – 2.1; Qiyinlik darajasi – 1




C++ tilida quyidagi programma qismi ishlaganda ekranga qanday natija chiqadi?

int i;


for (i=1;i<10;i++) ;

cout<


10

1dan 9gacha bo’lgan raqamlar ketma-ketligi

1dan 10gacha bo’lgan raqamlar ketma-ketligi

1


Manba: Bjarne Stroustrup. The C++ Programming Language (4th Edition). Addison-Wesley, 2013, Bob 2

102 Fan bobi – 2; Fan bo‘limi – 2.1; Qiyinlik darajasi – 2




C++ tilida quyidagi programma qismi ishlaganda ekranga qanday natija chiqadi?

int i,s=0;

for (i=1;i<10;i++){

s+=i;


i++;

}

cout<


25

45

1

10


Manba: Bjarne Stroustrup. The C++ Programming Language (4th Edition). Addison-Wesley, 2013, Bob 2

103 Fan bobi – 2; Fan bo‘limi – 2.1; Qiyinlik darajasi – 2




C++ tilida quyidagi programma qismi ishlaganda ekranga qanday natija chiqadi?

int a=123456,d=0,c=1;

do {

int i=a%10;



if(i%2==0) d+=i;

else c*=i;

}while(a>0,a/=10);

cout<


12;15

21;720

15;12

720;21


Manba: Bjarne Stroustrup. The C++ Programming Language (4th Edition). Addison-Wesley, 2013, Bob 7

104 Fan bobi – 2; Fan bo‘limi – 2.1; Qiyinlik darajasi – 1




C++ tilida fayl oqimi bilan ishlash tugaganidan so’ng, faylni yopishni uchun mo’ljallangan funksiya to’g’ri ko’rsatilgan qatorni toping

fclose()

fopen()

close()

exit()

Manba: Bjarne Stroustrup. The C++ Programming Language (4th Edition). Addison-Wesley, 2013, Bob 7

105 Fan bobi – 2; Fan bo‘limi – 2.1; Qiyinlik darajasi – 1




Identifikator sifatida foydalanish mumkin bo’lmagan javobni ko’rsating

int

a

A7

Pi


Manba: Bjarne Stroustrup. The C++ Programming Language (4th Edition). Addison-Wesley, 2013, Bob 1

106 Fan bobi – 2; Fan bo‘limi – 2.1; Qiyinlik darajasi – 1




C++da operatorlar qanday belgi bilan ajratiladi?

;

“ ” ya’ni probel bilan

:

,


Manba: Bjarne Stroustrup. The C++ Programming Language (4th Edition). Addison-Wesley, 2013, Bob 1

107 Fan bobi – 2; Fan bo‘limi – 2.1; Qiyinlik darajasi – 1




32 razryadli amaliyot tizimida int toifasi kompyuter xotirasidan

qancha joy egallaydi.

4 bayt

2 bayt

6 bayt

8 bayt


Manba: Bjarne Stroustrup. The C++ Programming Language (4th Edition). Addison-Wesley, 2013, Bob 2

108 Fan bobi – 2; Fan bo‘limi – 2.1; Qiyinlik darajasi – 1




Qaysi toifa kompyuter xotirasidan katta joy egallaydi.

long double

double

int

float


Manba: Bjarne Stroustrup. The C++ Programming Language (4th Edition). Addison-Wesley, 2013, Bob 1

109 Fan bobi – 2; Fan bo‘limi – 2.1; Qiyinlik darajasi – 1




32 razryadli amaliyot tizimida quyidagi programma qismi nima natija chiqaradi?

cout<


4

1

2

8


Manba: Bjarne Stroustrup. The C++ Programming Language (4th Edition). Addison-Wesley, 2013, Bob 1

110 Fan bobi – 2; Fan bo‘limi – 2.1; Qiyinlik darajasi – 1




|X| C++ da haqiqiy sonlar uchun qanday yoziladi.

fabs(x)

abs(x)

labs(x)

absf(x)


Manba: Bjarne Stroustrup. The C++ Programming Language (4th Edition). Addison-Wesley, 2013, Bob 1

111 Fan bobi – 2; Fan bo‘limi – 2.1; Qiyinlik darajasi – 1




10 dajasi x C++ da qanday yoziladi.

pow10(x)

pow(10,x)

pow(x,10)

10^x


Manba: Bjarne Stroustrup. The C++ Programming Language (4th Edition). Addison-Wesley, 2013, Bob 2

112 Fan bobi – 2; Fan bo‘limi – 2.1; Qiyinlik darajasi – 1




Quyidagi programma qismi nima natija chiqaradi?

int i, s=0;

for(i = 0; i < 6; i++)

{

s *= i;



}

cout << s ;



0

120

720

24


Manba: Bjarne Stroustrup. The C++ Programming Language (4th Edition). Addison-Wesley, 2013, Bob 2

113 Fan bobi – 2; Fan bo‘limi – 2.1; Qiyinlik darajasi – 1




Quyidagi programma qismi nima natija chiqaradi?

int i, s=1;

for(i = 0; i < 6; i++)

{

s *= i;



}

cout << s ;



0

720

24

120


Manba: Bjarne Stroustrup. The C++ Programming Language (4th Edition). Addison-Wesley, 2013, Bob 2

114 Fan bobi – 2; Fan bo‘limi – 2.1; Qiyinlik darajasi – 1




Quyidagi programma qismi nima natija chiqaradi?

int s = 1;

for(int i = 0; i <= 6; i += 2)

s+=i;


cout << s ;

13

12

22

21


Manba: Bjarne Stroustrup. The C++ Programming Language (4th Edition). Addison-Wesley, 2013, Bob 2

115 Fan bobi – 2; Fan bo‘limi – 2.1; Qiyinlik darajasi – 1




Quyidagi programma qismi nima natija chiqaradi?

int s = 1;

for(int i = 0; i <= 20; i ++)

{

s+=i;



if(s == 10) break;

}


cout << s ;

10

15

1

0


Manba: Bjarne Stroustrup. The C++ Programming Language (4th Edition). Addison-Wesley, 2013, Bob 2

116 Fan bobi – 2; Fan bo‘limi – 2.1; Qiyinlik darajasi – 1




Quyidagi programma qismi nima natija chiqaradi?

int s = 1;

for(int i = 0; i < 6; i ++)

{

s*=(i+1); i++;



}

s++; cout << s ;



16

15

0

1


Manba: Bjarne Stroustrup. The C++ Programming Language (4th Edition). Addison-Wesley, 2013, Bob 2

117 Fan bobi – 2; Fan bo‘limi – 2.1; Qiyinlik darajasi – 1




Quyidagi programma qismi nima natija chiqaradi?

int s = 1;

for(int i = 0; i <= 12; i++)

{

if(i % 3 == 0)



s++;

}

cout << s + 1;



7

5

6

4


Manba: Bjarne Stroustrup. The C++ Programming Language (4th Edition). Addison-Wesley, 2013, Bob 2

118 Fan bobi – 2; Fan bo‘limi – 2.1; Qiyinlik darajasi – 1




Quyidagi programma qismi nima natija chiqaradi?

int k = 0,s=0;

for(int i = 0; i <= 7; i++)

{

if(i % 3 != 0)break;



s++;

}

cout << s;



1

0

7

3


Manba: Bjarne Stroustrup. The C++ Programming Language (4th Edition). Addison-Wesley, 2013, Bob 1

119 Fan bobi – 2; Fan bo‘limi – 2.1; Qiyinlik darajasi – 1




X = false bo’lsa !X = ?

true

false

0

false yoki true


Manba: Bjarne Stroustrup. The C++ Programming Language (4th Edition). Addison-Wesley, 2013, Bob 2

120 Fan bobi – 2; Fan bo‘limi – 2.1; Qiyinlik darajasi – 1




Quyidagi programma qismi nima natija chiqaradi?

int n=7;


bool k;

k=n%2;


cout << k;

1

true

false

0


Manba: Bjarne Stroustrup. The C++ Programming Language (4th Edition). Addison-Wesley, 2013, Bob 2

121 Fan bobi – 2; Fan bo‘limi – 2.1; Qiyinlik darajasi – 1




Quyidagi programma qismi nima natija chiqaradi?

int n=11;

bool m;

m=!(n%2==1);



cout << m;

0

1

6.5

6


Manba: Bjarne Stroustrup. The C++ Programming Language (4th Edition). Addison-Wesley, 2013, Bob 2

122 Fan bobi – 2; Fan bo‘limi – 2.1; Qiyinlik darajasi – 1




Uchburchakning tomonlari a, b, c bo’lsa, uchburchak tengsizligini tekshirish qaysi javobda berilgan?

t = (a

t = (a

t = (a

t := (a


Download 62.12 Kb.

Do'stlaringiz bilan baham:
1   2   3   4   5   6   7




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling