1.
What will happen if you try to assign a decimal value like 3.14 to an int variable in C#?
2.
What is the difference between value types and reference types in C#?
3.
Which of the following correctly defines method overloading in C#?
4.
What is encapsulation in object-oriented programming?
5.
What is the output of the following code? int x = 10; int y = 3; Console.WriteLine(x % y);
6.
Which access modifier makes a class member accessible only within the same class?
7.
What is the difference between a while loop and a do-while loop in C#?
8.
What does the static keyword mean when applied to a method in C#?
9.
Which principle of OOP allows the same method name to behave differently in different classes?
10.
What will be the output of this code? int i = 0; while (i < 3) { Console.WriteLine(i); i++; }
1 out of 1