Dasturlash fanidan yakuniy nazorat testlari
Download 16.29 Kb.
|
dasturlash 2 dan nazarot sav.T.M
DASTURLASH FANIDAN YAKUNIY NAZORAT TESTLARI. 1. C ++ tilida int i tavsifi qanday ma’noni bildiradi? a) i ning butun turga ega ekanini b) i ning haqiqiy turga ega ekanini c) i ning mantiqiy turga ega ekanini d) i ning satr turga ega ekanini 2. C ++ tilida asosiy turlarni ko`rsating. a) char short int long float double b) char short int long float double exstended c) char short int exstended float double d) long short int exstended float double 3. C ++ tilida teng emas munosabat belgisini ko`rsating a) ! = b) < > c) > < d) < ! = > 4. C++ tilida ma`lumotlarni kiritish operatorini ko`rsating a) sin<< b) sin>> c) cin>> d) cin<< 5. Shart operatorining umumiy formatini ko`rsating a) if (ifoda)(oparator-1;)[else{oparatir-2;}] b) if (ifoda)[oparator-1;][else{oparatir-2;}] c) if (ifoda){oparator-1;}[else{oparatir-2;}] d) if (ifoda)[oparator-1;][else[oparatir-2;]] 6. Dastur natijasini aniqlang r=?. int t=2; int b=7; int r=3;
{
{
}
{
}
r=3 b) r=2 r=4 d) r=0 7. Quyidagi dastur vazifasini aniqlang int i, b; for (i=1; i<10; i++) { b=i*i; cout<<="" p="" Times New Roman"; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"> } a) 1 dan 9 gacha bo‘lgan sonlarning kvadratlarining yig`indisi hisoblanadi b) 1 dan 9 gacha bo‘lgan sonlar kvadratlari hisoblanadi c) 1 dan 9 gacha bo‘lgan sonlar yig`indisi hisoblanadi d) 1 dan 9 gacha bo‘lgan sonlar ko`paytmasi hisoblanadi 8. Ko‘rsatkichlar massivlari qanday ta’riflanadi a) *[] b) *[] c) *[] d) *[] 9. unsigned strlen(const char*s) qanday funksiya? a) satr uzunligini hisoblash b) satr kengligini hisoblash c) satrdan nusha olish d) satrni o`cherish 10. … - ma’lumotlarning va shu ma’lumotlar ustida ish olib boradigan kodlarning bitta obyektda birlashtirilishi a) Inkapsulatsiyalash b) vorislik c) poliformizm d) sinflar 11. Quyidagi dastur qismining natijasini aniqlang. for (int i = 0; i < 10 ; i++) cout << "Hello!"<< endl; a) 0 dan 10 gacha bo‘lgan sonlar ekranga chiqariladi b) 1 dan 10 gacha bo‘lgan sonlar ekranga chiqariladi c) Berilgan ibora ekranga 11 marta chiqariladi d) Berilgan ibora ekranga 10 marta chiqariladi 12. Quyidagi dastur qismiga mos bo`lgan operatorni joylashtiring. … (int i = 8; i <= 13 ; i++) cout << "Raxmat!"<< endl; a) While b) do … while c) for d) if 13. do … while oparatorining umumiy ko`rinishini ko`rsating. a) while { ; } do (); b) do {
} while (); c) do {
} while (); d) while { }
14. Ushbu dasturning natijasini aniqlang. int i = 0; while ( i<10 ) { i++; }
c) 65 d) 66 15. Quyidagi mantiqiy ifodaning qiymatini toping. Int i=10; !(i<=8)||(5 a) false b) yolg`on c) true d) 0
Download 16.29 Kb. Do'stlaringiz bilan baham: |
ma'muriyatiga murojaat qiling