struct emp
{
public String name;
public int age;
public Single sal;
}
emp e = new emp();Select an option to see the answer and solution.
Practice every MCQ with options. Use Show answers when you want the correct option and solution.
238
Questions
3/12
Page
Pick an option on a question to see the right answer and solution.
struct emp
{
public String name;
public int age;
public Single sal;
}
emp e = new emp();Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.
class maths
{
int fact(int n)
{
int result;
if (n == 1)
return 1;
result = fact(n - 1) * n;
return result;
}
}
class Output
{
static void main(String args[])
{
maths obj = new maths() ;
Console.WriteLine(obj.fact(4)*obj.fact(2));
}
}Select an option to see the answer and solution.
static void Main(string[] args)
{
Mul();
m();
Console.ReadLine();
}
static void Mul()
{
Console.WriteLine("4");
}
static void m()
{
Console.WriteLine("3");
Mul();
}Select an option to see the answer and solution.
Select an option to see the answer and solution.
enum color:byte
{
yellow = 500,
green = 1000,
pink = 1300
}Select an option to see the answer and solution.
Select an option to see the answer and solution.
{
struct abc
{
int i;
}
class Program
{
static void Main(string[] args)
{
abc x = new abc();
abc z;
x.i = 10;
z = x;
z.i = 15;
console.Writeline(x.i + " " + y.i)
}
}
}Select an option to see the answer and solution.
class maths
{
public int fact(int n)
{
int result;
result = fact(n - 1) * n;
return result;
}
}
class Program
{
static void Main(string[] args)
{
maths obj = new maths();
Console.WriteLine(obj.fact(4));
Console.ReadLine();
}
}Select an option to see the answer and solution.
class A
{
public int i;
private int j;
}
class B :A
{
void display()
{
base.j = base.i + 1;
Console.WriteLine(base.i + " " + base.j);
}
}
class Program
{
static void Main(string[] args)
{
B obj = new B();
obj.i = 1;
obj.j = 2;
obj.display();
Console.ReadLine();
}
}Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.
static void Main(string[] args)
{
int a = 5;
int s = 0, c = 0;
Mul (a, ref s, ref c);
Console.WriteLine(s + "t " +c);
Console.ReadLine();
}
static void Mul (int x, ref int ss, ref int cc)
{
ss = x * x;
cc = x * x * x;
}Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.