Essay on The Republic Day | Republic Day Essay in English
[ Festival Ganesh Chaturthi Essay in English for Students and Children ] [ Essay on my favourite freedom fighter ] ⚔️ [ दुर्गा पूजा पर निबंध (Durga Puja Hindi Essay) ]
[Essay On 75th Independence Day Of India] [Azadi Ka Amrit Mahotsav Essay in English]

## Which of the following statements are correct about the following c

Practice Assignment Operators –

Which of the following statements are correct about the following code snippet?

``````int a = 10;
int b = 20;
bool c;
c = !(a > b);``````
1. There is no error in the code snippet.
2. An error will be reported since ! can work only with an int.
3. A value 1 will be assigned to c.
4. A value True will be assigned to c.
5. A value False will be assigned to c.

## What will be the output of the C#.NET code snippet given below?

Practice Assignment Operators –

What will be the output of the C#.NET code snippet given below?

``````int a = 10, b = 20, c = 30;
int res = a < b ? a < c ? c : a : b;
Console.WriteLine(res);``````

## What will be the output of the C#.NET code snippet given below?

Practice Assignment Operators –

What will be the output of the C#.NET code snippet given below?

``````int i, j = 1, k;
for (i = 0; i < 5; i++) {
k = j++ + ++j;
Console.Write(k + " ");
}``````

## Which of the following statements is correct about Bitwise |

Practice Operators Questions –

Which of the following statements is correct about Bitwise | operator used in C#.NET?

## Which of the following statements is correct about Bitwise ^

Practice Operators Questions –

Which of the following statements is correct about Bitwise ^ operator used in C#.NET?

## Which of the following statements are correct about the Bitwise

Practice Operators Questions –

Which of the following statements are correct about the Bitwise & operator used in C#.NET?

1. The & operator can be used to Invert a bit.
2. The & operator can be used to put ON a bit.
3. The & operator can be used to put OFF a bit.
4. The & operator can be used to check whether a bit is ON.
5. The & operator can be used to check whether a bit is OFF.

## Which of the following will be the correct output for the C#.NET co

Practice Strings Questions –

Which of the following will be the correct output for the C#.NET code snippet given below?

``````String s1 = "Nagpur";
String s2;
s2 = s1.Insert(6, "Mumbai");
Console.WriteLine(s2);``````

## Which of the following will be the correct output for the C#.NET pr

Practice Bitwise Operators Questions –

Which of the following will be the correct output for the C#.NET program given below?

``````namespace ConsoleApplication {
struct Sample {
public int i;
};
class MyProgram {
static void Main() {
Sample x = new Sample();
x.i = 10;
fun(x);
Console.Write(x.i + " ");
}
static void fun(Sample y) {
y.i = 20;
Console.Write(y.i + " ");
}
};
}``````

## Which of the following will be the correct output for the C

Practice Bitwise Operators Questions –

Which of the following will be the correct output for the C#.NET program given below?

``````namespace LogicConsoleApplication {
struct Sample {
public int i;
}
class MyProgram  {
static void Main(string[] args) {
Sample x = new Sample();
x.i = 10;
fun(ref x);
Console.Write(x.i + " ");
}
public static void fun(ref Sample y) {
y.i = 20;
Console.Write(y.i + " ");
}
}
}``````

## Which of the following will be the correct output for the C#.NET co

Practice Strings Questions –

Which of the following will be the correct output for the C#.NET code snippet given below?

``````String s1 = "Nagpur";
String s2;
s2 = s1.Insert(6, "Mumbai");
Console.WriteLine(s2);``````

## Which of the following statements are true about the C#.NET code sn

Practice Strings Questions –

Which of the following statements are true about the C#.NET code snippet given below?

``````String s1, s2;
s1 = "Hi";
s2 = "Hi";``````
1. String objects cannot be created without using new.
2. Only one object will get created.
3. s1 and s2 both will refer to the same object.
4. Two objects will get created, one pointed to by s1 and another pointed to by s2.
5. s1 and s2 are references to the same object.

## Which of the following ways to create an object of the Sample

Practice Constructor Questions –

Which of the following ways to create an object of the Sample class given below will work correctly?

``````class Sample {
int i;
Single j;
double k;
public Sample (int ii, Single jj, double kk) {
i = ii;
j = jj;
k = kk;
}
}``````

## Which of the following statements is correct about Bitwise ^

Practice Operators Questions –

Which of the following statements is correct about Bitwise ^ operator used in C#.NET?

## Which of the following will be the correct result of the statement

Practice Structures Questions –

Which of the following will be the correct result of the statement b = a in the C#.NET code snippet given below?

``````struct Address {
private int plotno;
private String city;
}
b = a;``````

## Which of the following statements is correct about the C#.NET code

Practice Structures Questions –

Which of the following statements is correct about the C#.NET code snippet given below?

``````class Trial {
int i;
Decimal d;
}
struct Sample {
private int x;
private Single y;
private Trial z;
}
Sample ss = new Sample();``````