Dasturlash 2 (1-30)

Create an educational illustration depicting a friendly robot teaching C++ programming concepts with books and a computer in a bright, engaging classroom environment.

C++ Programming Proficiency Quiz

Test your knowledge of C++ programming concepts with this comprehensive quiz designed for both beginners and experienced programmers.

Join now and challenge your understanding of:

  • Polymorphism and control structures
  • Looping constructs
  • File handling
  • Conditional statements
30 Questions8 MinutesCreated by CodingExpert512
Polimorfizm bu:
Turdosh sinflar uchun umumiy harakatlarni belgilash uchun bitta nomdan foydalanishga ruxsat berishni anglatadi
Bir sinfda bir xil nomdagi usullardan foydalanish imkonini beruvchi vosita;
Bir sinfda bir xil amallarni bajarish uchun turli nomdagi usullardan foydalanish imkonini beruvchi vosita
Har xil turdagi yoki boshqa miqdordagi argumentlar bilan ishlash uchun funksiyalarni ortiqcha yuklashga imkon beruvchi vosita.
while ( takrorlash_sharti) {…} " kostruksiyasininig to’gri tarifini ko'rsating ?
Old shartni tekshirish sikli
Ko'p muqobil operator
So'ng shartli sikl operatori
Parametrik sikl
C++ tilidagi shartli o'tish operatori ... hisoblanadi
If
Switch
Goto
Break
siklning tanasi necha marta bajarilishini aniqlang? Int i=0; do { i++; … } while(i/3>0);
1
2
10
Sikl bajarilmaydi
siklning tanasi necha marta bajarilishini aniqlang: int I; for ( I = -8; I % 3 <= -2; ++i ) { ….. }
1
2
Bir marta ham bajarilmaydi
3
siklning tanasi necha marta bajarilishini aniqlang: int I; for ( I = -8; I % 3 <= -1; ++i ) { ……. }
2
1
3
8
C ++ tanlash operatori ...
Switch ... case
If ...else
Continue
Exit()
Kod fragmentini bajargandan so'ng x o'zgaruvchining qiymatini aniqlang int x = 1, y = 0; while ( y < 10 ) y = 3 * ( ++x ) + 1;
3
2
1
4
Qaysi operator bir konstanta ifodadan boshqasiga o'tishga ruxsat bermaydi?
Break
Endl
Stop
:
Kod fragmenti bajarish natijasida monitorga nima chop qilinadi int x=1, y=3; if (--x && ++y) y+=3; cout<<”\n x+y=”<<x+y<<endl;
X+y=3
X+y=4
X+y=7
X+y=9
Quyidagi dastur qismi natijasini aniqlang int x = 0; int y = 0; if (x++ && y++){ y += 2; } std::cout << x + y;
1
2
3
4
Qaysi mulohoza to'g'ri?
Switch tanlash operatorida bloklarini yozish uchun figurali qavslardan foydalanish shart emas.
Switch tanlash operatorida case dan keyin dastur kodi uchun bloki uchun keyingi kod bloklari har doim ochiladigan figurali qavs bilan boshlanishi kerak {va yopilish figurali qavs bilan tugashi kerak.
Switch tanlash operatorida case dan keyin bir nechta operator berilgan bo’lsa ular figurali qavslarga olinadi.
To'g'ri mulohoza mavjud emas
C++ tilidagi shartsiz o'tish operatori ... hisoblanadi.
Goto
Switch
If
Continue
Sikl operatori turlarining to'g'ri sonini ko'rsating?
3
2
1
4
siklning tanasi necha marta bajarilishini aniqlang: int I = 0; do { i++; …. } while ( I / 2 > 0);
1
Bir marta ham bajarilmaydi
2
3
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 ” );
3
4
1
13
C++ tilida ishlatiladigan sikl operatorining to'g'ri versiyasini ko'rsating.
For,while,do while
Cout, getch, return
While, NULL, type
Cin, gets, char
Fayllar bilan ishlashda fayllarni ochishning "rw" rejimi vazifasi qanday?
Fayllar bilan ishlashda bunday rejim mavjud emas
Faylni o’qish uchun ochiladi;
Fayl davomiga qo’shish uchun ochadi;
Faylni o’qish va yozish uchun ochadi
Fayllar bilan ishlashda fayllarni ochishning a rejimi vazifasi qanday?
Fayl davomiga malumot qo’shish uchun ochadi;
Faylni o’qish uchun ochiladi;
Faylni yozish uchun hosil qiladi;
Faylni o’qish va yozish uchun ochadi
Kod fragmentini bajargandan so'ng x o'zgaruvchining qiymatini aniqlang int x = 1, y = 0; while ( y < 10 ) y = 3 * ( ++x ) + 1;
3
2
1
4
Sikl operatori ko'rsatilgan to'g'ri qatorni belgilang 1. If then else 2. for( int i=1;i> a;) 3. for(sikl parametri>:=; shart ;) 4. for( ; ; ) if (a<0) break; else {s +=a; cin>> a;} 5. for(sikl parametri >:=< oxirgi qiymat > ) downto ; do <operator
2,4
2,3
3,4
1,2
Quyidagi ibora qanday yoziladi "Agar o'zgaruvchi indeks sizedan katta bo'lsa, biz o'zgaruvchilar sonini (count) oshiramiz"?
If (index>size) count++;
If index>size { count++; }
If (index>=size) { ++count; }
If (index>size) { count++ }
Fayllar bilan ishlashda fayllarni ochishning wb rejimi vazifasi qanday?
Ikkilik faylini yozish uchun hosil qiladi.
Ikkilik faylini o’qish uchun ochadi;
Ikkilik faylini oxiriga qo’shish uchun ochadi;
Fayl davomiga qo’shish uchun ochadi;
Quyidagi ifodaning qiymatini aniqlang: 3 – 4 * – 2
11
2
-11
-14
Ushbu dastur qismi bajarilgandan so'ng ekranda qanday natija paydo bo'ladi: int k; int main(){ k = 123; printf("%d", k ++); return 0; }
123
124
122
121
Ushbu dasturda a nimaga teng bo'ladi? Int a = 10, n = 6; for(int I = 0; I < n; I ++) a += I;
25
30
35
31
"while (condition_expression) {…}" bu konstruksiya nimani anglatadi?
Old shartli sikl operatori
So’ng shartli sikl operatori
Tanlash operatori
Parametrik sikl
Fayllar bilan ishlashda fayllarni ochishning rb rejimi vazifasi qanday?
Ikkilik faylini o’qish uchun ochadi ;
Ikkilik faylini oxiriga qo’shish uchun ochadi;
Fayl davomiga qo’shish uchun ochadi;
Faylni o’qish va yozish uchun ochadi
C ++ dasturlash tilida ishlatiladigan operatorlar to'g'ri ko'rsatilgan qatorni aniqlang
Cout, getch, return
Begin , include, clrscr
While, NULL, type
Cin, gets, char
Quyidagi ifodaning qiymatini aniqlang: 2 – 3 * – 1
5
-5
1
-2
{"name":"Dasturlash 2 (1-30)", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"Test your knowledge of C++ programming concepts with this comprehensive quiz designed for both beginners and experienced programmers.Join now and challenge your understanding of:Polymorphism and control structuresLooping constructsFile handlingConditional statements","img":"https:/images/course4.png"}
Powered by: Quiz Maker