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


Download 79.17 Kb.
bet16/19
Sana27.03.2023
Hajmi79.17 Kb.
#1301029
1   ...   11   12   13   14   15   16   17   18   19
Bog'liq
DASTURLASH 1 baza @tatu1k

A) Cheklanmagan miqdorda B)10 C)5 D)30
153. Quyidagi dastur natijasini aniqlang:
#include
using namespace std;
int main(){
char s[]="Aka";
*s='U';
cout< return 0;
}

  1. Uka B)U C)Kompilatsiyada hatolik D)Aka

154.Notogri berilgan ifodani aniqlangh?
A)A!%5 B)A==5 C)A!=5 D)A=5
155. Quyidagi ifodani qiymatini aniqlang :
1-2*-3

  1. 7 B)5 C)-5 D) 3

156. Ushbu dasturda a nimaga teng boladi?
int a=10, n=6;
for(int i=0; ia+=i;
A)25 B) 30 C)35 D) 20
157. Quyidgi dastur natijasini aniqlang.
#include
using namespace std;
int f(int a){
return ++a;
}
int f(unsigned int a){
return --a;
}
int main(){
std::cout< return 0;
}
A) 6 B) 4 C)Kompilatsiyada xatolik D)5
158. Berilgan dasturda s qiymatini toping?
s=1, n=5;
while(n>0){
s*=n; n-=2;}

  1. 15 B)20 C) 25 D)5

159. Quyidagi funksiyalardan qaysi biri ikki satrni taqqoslaydi?
A) compare(); B) strcmp(); C)cmp(); D)Stringcompare();
160. So’ng shartli sikl operatorining korsatilgan togri variantni korsating?
A) do while B) switch C) while D) for
161. Quyudagi ibora qanday yoziladi “Agar ozgaruvchi indeks sizedan kata bolsay, bir hil ozgaruvchilar sonini (count) oshiramiz”?
A) if(index>size){count++} B) if(index>=size){++count;}
C) if index>size {count++} D) if(index>size) count ++;
162. Dasturning natijasi qanday boladi?
int main(){
int a,b,c;
double d;
a=0; b=2; c=1;
d=(a+b)/c+pow(b,a)/b;
cout<return 0;
}

  1. 2.5 B)25 C) 5 D)2

163. Quyidagi dasturda n soniga 7 kiritilsa dastur natijasini chop eting:
#include
using namespace std;
int get(int n){
return n<2?n:get(n-1)+get(n-2);}
int main(){
int n; cin>>n;
cout<return 0;}
A)13 B) 34 C)55 D)21
164. Quyidagi dasturda n soniga 9 kiritilsa dastur natijasini chop eting:
#include
using namespace std;
int get(int n){
return n<2?n:get(n-1)+get(n-2);}
int main(){
int n; cin>>n;
cout<return 0;}

  1. 34 B) 13 C)21 D)55

165. Quyidagi dastur qismiga a=24, b=20 kiritilsa javob nechchi chiqishini aniqlang.
int a, b;
cin>>a>>b;
while(a!=b){

if(a>b)
a-=b;
else b-=a;
}
cout<

  1. 4 B)20 C)24 D)5

166. Siklning tanasi necha marta takrorlanishini aniqlang :
int i=1;
while(i*i<64){
……..
i*=2;
}


  1. Download 79.17 Kb.

    Do'stlaringiz bilan baham:
1   ...   11   12   13   14   15   16   17   18   19




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