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


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


Download 62.12 Kb.
bet2/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 13

30 Fan bobi – 4; Fan bo‘limi – 4.1; Qiyinlik darajasi – 2




FILE *talabaf=fopen("C:\TALABA\iat1kuz.txt", "w+");

xotirada yangi "iat1kuz.txt" fayl yaratilib, o‘zgartirish (o‘qish va yozish) uchun ochiladi. Agar fayl mavjud bo‘lsa, undagi oldingi yozuvlar o‘chiriladi va u qayta yozishga tayyorlanadi.

xotirada mavjud "iat1kuz.txt" fayli va yozish uchun ochiladi.

xotirada yangi "iat1kuz.txt" fayl yaratilib, yozish uchun ochiladi. Agar fayl mavjud bo‘lsa, undagi oldingi yozuvlar o‘chiriladi va u qayta yozishga tayyorlanadi.

xotiradagi "iat1kuz.txt" fayli o‘qish uchun ochiladi. Agar fayl mavjud bo‘lmasa, xatolik ruy beradi.


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

31 Fan bobi – 4; Fan bo‘limi – 4.1; Qiyinlik darajasi – 2




FILE *talabaf=fopen("C:\TALABA\iat1kuz.txt", "wb+");

xotirada yangi "iat1kuz.txt" binar fayl yaratilib, o‘zgartirish (o‘qish va yozish) uchun ochiladi. Agar fayl mavjud bo‘lsa, undagi oldingi yozuvlar o‘chiriladi va u qayta yozishga tayyorlanadi.

xotiradagi mavjud "iat1kuz.txt" matn fayli yozish uchun ochiladi.

xotirada yangi "iat1kuz.txt" binar fayl yaratilib, yozish uchun ochiladi. Agar fayl mavjud bo‘lsa, undagi oldingi yozuvlar o‘chiriladi va u qayta yozishga tayyorlanadi.

xotiradagi "iat1kuz.txt" matn fayli o‘qish uchun ochiladi. Agar fayl mavjud bo‘lmasa, xatolik ruy beradi.


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

32 Fan bobi – 4; Fan bo‘limi – 4.1; Qiyinlik darajasi – 2




Formatli o‘qish scanf() funksiyasidagi formatlash satri asosiy vazifasi nima?

*Oqimdagi maydonlarni qanday formatdagi qiymatlarga aylantirish zarurligini ko‘rsatadi.

Oqimdagi maydonlarni qaysi adreslarga joylashtirish zarurligini ko‘rsatadi.

Ekranga chop etiladigan oddiy satr

Oqimdagi maydonlarni qanday formatdagi sonlarga aylantirish zarurligini ko‘rsatadi.


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

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




C++ tilida konsol rejimda ishlash jarayonida ma’lumotlarni standart oqimga (ekranga)chiqarish uchun to’g’ri format keltirilgan javobni toping

cout<<

cin>>

cout>>

To’g’ri javob keltirilmagan


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

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




C++ tilida konsol rejimda ishlash jarayonida berilganlarni standart oqimdan o’qish formati to’g’ri ko’rsatilgan javobni aniqlang

cin>>

cout<<

cin<<

cout>>


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

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




C++ tilida haqiqiy sonning butun va kasr qismilari qaysi belgi yordamida ajratiladi

Nuqta “.”

Vergul “,”

Nuqta vergul “;”

Slash “/”


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

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




Identifikator nima?

Katta va kichik lotin harflaridan, raqamlar va tag chiziq(‘_’) belgilaridan tashkil topgan va raqamdan boshlanmaydigan belgilar ketma -ketligi

Katta va kichik lotin harflaridan, raqamlar va tag chiziq(‘_’) belgilaridan tashkil topgan va faqat raqamdan boshlanuvchi gan belgilar ketma –ketligi

Katta va kichik lotin harflaridan tashkil topgan ketma-ketlik

Katta va kichik lotin harflaridan, raqamlar va tag chiziq(‘_’) belgilaridan tashkil topgan va tag chiziq(‘_’)dan boshlanmaydigan belgilar ketma –ketligi


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

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




O’zgarmas bu -…

Fikserlangan sonni, satrni va belgini ifodalovchi leksemadir

Fikserlangan sonni ifodalovchi leksema

Fikserlangan satrni va belgini ifodalovchi leksema

To’g’ri javob ko’rsatilmagan


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

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




O’zgarmaslar nechta guruhga bo’linadi?

5 ta

4 ta

3 ta

6ta


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

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




C++ tilida butun son qiymatlarini qabul qiluvchi o’zgaruvchilar qaysi kalit so’z yordamida aniqlanadi?

int

Float

Char

Bool


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

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




C++ tilida belgi turidagi o’zgaruvchilar qaysi kalit so’z yordamida anilanadi

char

String

Double

Int


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

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




C++ tilida “bool” kalit so’zi orqali e’lon qilinuvchi o’zgaruvchilar qanday turdagi o’zgaruvchilar deyiladi

Mantiqiy turdagi

Butun turdagi

Haqiqiy turdagi

Belgi turidagi


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

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




Mantiqiy turdagi o’zgaruvchilar qanday qiymatlar qabul qiladilar?

*0(false) yoki 0dan farqli qiymat (true)

0 (false)

True

0(true) yoki 0dan farqli qiymat(false)


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

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




Haqiqiy turdagi o’zgaruvchilarga xotirada qancha joy ajratiladi

4 bayt

3 bayt

2 bayt

1 bayt


Manba: Мадрахимов Ш.Ф., Гайназаров С.М. C++ тилида дастурлаш асослари// Тошкент, ЎзМУ, I Bob

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




Haqiqiy turdagi o’zgaruvchilar sonni xotirada qanday qolipda saqlaydi?










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

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




C++ tilida mantiqiy inkor amali qaysi belgi yordamida ifodalanadi

!

||

&&

^


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

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




C++ tilida konyunksiya(mantiqiy ko’paytma) amali qaysi belgi yordamida ifodalanadi

&&

||

!

%


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

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




C++ tilida ixtiyoriy turdagi o’zgaruvchilarning o’lchamini qaysi amal yordamida aniqlanadi?

sizeof

Length

Strlen

Size


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

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




C++ tilida baytdagi bitlat qiymatini chapga surish uchun qanday amaldan foydalaniladi

<<

>>

<

>


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

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




C++ tilida dinamik ob’yekt yaratuvchi operator

new

Sizeof

Delete

casting


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

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




Quyidagi programma ishlashi natijasida ekranga qanday qiymat chiqadi?

#include

int main(){

int x=1;


x+=5;

cout<


return 0;

}


6

5

0

Xatolik haqidagi habar


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

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




C++ tilida blok bu-…

‘{’ va ‘}’ oralig’iga olingan operatorlar ketma-ketligi bo’lib, u kompilyator tomonidan yaxlit operator deb qabul qilinadi

‘(’ va ‘)’ oralig’iga olingan operatorlar ketma-ketligi bo’lib, u kompilyator tomonidan yaxlit operator deb qabul qilinadi

‘[’ va ‘]’ oralig’iga olingan operatorlar ketma-ketligi bo’lib, u kompilyator tomonidan yaxlit operator deb qabul qilinadi

To’g’ri javob keltirilmagan



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

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




Quyidagi programma ishlashi natijasida ekranga qanday qiymat chiqadi?

#include

int main(){

int a=4, b=8, y;

y=a>b?a:b;

cout<


return 0;

}


8

5

12

0.5



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

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




C++ tilida for takrorlash opratorining sintaksis ko’rinishi to’g’ri ko’rsatilgan javobni toping.

for(;; )

for()operator yoki blok>

for(,, )

for(;; )

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

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




Quyidagi programma ishlashi natijasida ekranda qanday qiymat aks etadi?

#include

int main (){

int s=0,i;

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

s+=i;


cout<return 0;

}


45

55

10

1


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

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




C++ tilde while takrorlash opratori qachongacha oprator yoki blokni takror bajaradi?

Takrorlash sharti yolg’on(false yoki 0) bo’lguncha

Takrorlash sharti rost (true) bo’lguncha

Takrorlash sharti bir (1) bo’lguncha

O’zidan keyin yana takrorlash opretori uchramaguncha



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

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




C++ tilida cheksiz takrorlashni while opretori yordamida qanday tasvirlanadi?

while(1)

while(0)

while()

while(false)


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

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




C++ tilida oldin opretorni yoki blokni bajarib keyin takrorlash shartini tekshiruvchi operator qaysi?

do-while

While

for

Bunday takrorlash opratori mavjud emas


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

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




C++ tilida break opretori bu - …

Takrorlash opretori tanasining ixtiyoriy(zarur) joylariga qo’yish orqali shu joylardan takrorlashdan chiqish imkonini beruvchi oprator

Takrorlash opretori tanasining ixtiyoriy(zarur) joylariga qo’yish orqali shu joylarda takrorlash tanasini bajarishni to’xtarib takrorlashdan chiqib ketmasdan keying qadamga “sakrab” o’tish imkonini beruvchi oprator.

Programma ishini to’xtatuvchi oprtator

To’g’ri javob ko’rsatilmagan



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