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

Loading

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.

Which of the following statements are correct about the Bitwise

Loading

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 pr

Loading

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

Loading

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 statements are true about the C#.NET code sn

Loading

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.