44. Console.WriteLine("Exclusive OR: "+ ((2 < 3) ^ (4 > 3))); mantiqiy ifoda natijasi berilgan javobni belgilang? a) Exclusive OR: False
b) Exclusive : True
c) True
d) Exclusive OR: True
45. Quyidagi kodning kompilyatsiya va ijro natijasi qanday bo‘ladi: using
System;
public
class
Test
{
public
static
void
Main()
{
bool value = !(7 == 5);
Console.WriteLine(value);
}
}
}
a) true
b) Kompilyatsiya xatoligi vujudga keladi
s) false
d) 0
46. Quyidagi kodning kompilyatsiya va ijro natijasi qanday bo‘ladi: int
number = 6;
switch
(number)
{
case
1:
case
4:
Dasturlash tillari va axborot-kommunikatsiya texnologiyalari 1-semestr
126
case
6:
case
8:
case
10:
Console
.WriteLine(
"The number is not
prime!"
);
case
2:
case
3:
case
5:
case
7:
Console
.WriteLine(
"The number is prime!"
);
default
:
Console
.WriteLine(
"Unknown number!"
);
break
;
}
a) The number is not prime!
b) Kompilyatsiya xatoligi vujudga keladi
s) The number is prime!
d) Unknown number!
Dasturlash tillari va axborot-kommunikatsiya texnologiyalari 1-semestr
127
6-mavzu. Sikl operatorlari Reja 1.
Kirish ([2] 211-212-betlar)