A b c d kompilyatsiyadagi xatolik E`lon qilingach char a o`zgaruvchisining qaysi biri to`g`ri emas? A “3”


long sum=0; for (unsigned int i=0;i


Download 79.17 Kb.
bet5/19
Sana27.03.2023
Hajmi79.17 Kb.
#1301029
1   2   3   4   5   6   7   8   9   ...   19
Bog'liq
DASTURLASH 1 baza @tatu1k

long sum=0;
for (unsigned int i=0;i
if(ary[i]<0){
sum+=ary[i];
}
}
cout<
..
41.Ushbu kodni bajargandab so’ng o’zgaruvchining ekvivalenti nima?
int a;for(a=0;a<10;a++){}
A)10
B)1
C)11
D) 9
42.C++ tanlash operatori…
A)switch ….case
B)continue
C)exit()
D)if…else
43.siklning tanasi necha marta bajarilishini aniqlang;
int i;
for(i=-8;i%3<=-1;i++)
{
……….
}
A)2
B)8
C)1
D)3
44.Kod fragmenti bajargandan so’ng x qiymatini toping:
int x=0,y=0;
while(y<10)
y=3*(++x)+1;
A)3
B)1
C)4
D)Cheksiz sikl
45.Quyidagi sinflardan qaysi biri fayllardan o’qishni amalga oshiradi?
A)ifstream
B)instream
C)ofstream
D)inputfile
46.Shartli operator noto’g’ri yozilgan javob variantini tanlang?
A)if(x=1){y=1}else y=2;
B) if(x==1){y=1;}else{ y=2;}
C) if(x==1)y=1;else y=2;
D) if(x==1) y=1;else y=2;
47.Quyidagi dastur qismi bajarilganda ekranga nimani chop qiladi
int x=2;
if(x<4 || x>6)
if(x>2 && x<8)
if(!(x<5))
printf(“1”);
else printf(“2”);
else printf(“3”);
else printf(“4”);
A)3
B)4
C)1
D)13
48.siklning tanasi necha marta bajarilishini aniqlang;
int i=0;
do{
i++;
……
} while(2/i>0);
A)3
B)1
C)2
D)bir marta ham bajarilmaydi
49.stringstream funksiyasini chaqirish uchun qanday sarlavha faylidan foydalaniladi?
A)sstream
B)iomanip
C)conio.h
D) Ifstream.h
50.Quyidagi sinflardan qaysi qaysi biri vositasida fayllarga kiritishni amalga oshiradi?
A)ofstream
B)inputfile
C)ifstream
D)instream
51.Fayl oxirida boshlang’ich pozitsiyasini o’rnatish uchun qaysi rejim(mode)dan foydalaniladi?

Download 79.17 Kb.

Do'stlaringiz bilan baham:
1   2   3   4   5   6   7   8   9   ...   19




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