Generic selectors
Exact matches only
Search in title
Search in content
Search in posts
Search in pages
Filter by Categories
nmims post
Objective Type Set
Online MCQ Assignment
Question Solution
Solved Question
Uncategorized

C# MCQ Set 1

1. Which among these access specifiers should be used for main() method?
a) private
b) public
c) protected
d) none of the mentioned

View Answer

Answer: b [Reason:] main() method must be specified public as it called by Csharp run time system outside of the program,by default main is private in nature if no access specifier is used.

2. Which of these is used as default for a member of a class if no access specifier is used for it?
a) private
b) public
c) protected internal
d) protected

View Answer

Answer: a [Reason:] None.

3. What is the process by which we can control what parts of a program can access the members of a class?
a) Polymorphism
b) Abstraction
c) Encapsulation
d) Recursion

View Answer

Answer: c [Reason:] None.

4. Which of these base class are accessible to the derived class members?
a) static
b) protected
c) private
d) shared

View Answer

Answer: b [Reason:] None.

5. What will be the output of the given code snippet?

  1.  class access
  2.  {
  3.      public int x;
  4.      private int y;
  5.      public  void cal(int a, int b)
  6.      {
  7.          x = a + 1;
  8.          y = b;
  9.      }
  10.  }    
  11.  class Program
  12.  {
  13.      static void Main(string[] args)
  14.      {
  15.          access obj = new access();   
  16.          obj.cal(2, 3);
  17.          Console.WriteLine(obj.x + " " + obj.y);     
  18.      }
  19.  }

a) 3 3
b) 2 3
c) Run time error
d) Compile time error

View Answer

Answer: d [Reason:] ‘y’ is defined privately which cannot be accessed outside its scope.

6. What will be the output of the given code snippet?

  1. class access
  2. {
  3.     public int x;
  4.     private int y;
  5.     public  void cal(int a, int b)
  6.     {
  7.         x = a + 1;
  8.         y = b;
  9.     }
  10.     public  void print() 
  11.    {
  12.        Console.WriteLine(" " + y);     
  13.    } 
  14. }    
  15. class Program
  16. {
  17.     static void Main(string[] args)
  18.     {
  19.         access obj = new access();   
  20.         obj.cal(2, 3);
  21.         Console.WriteLine(obj.x);
  22.         obj.print();
  23.         Console.ReadLine();
  24.     }
  25. }

a) 2 3
b) 3 3
c) Run time error
d) Compile time error

View Answer

Answer: b [Reason:] None.

7. What will be the output of the following set of code?

  1.  class sum   
  2.  {
  3.      public int x;
  4.      public int y;
  5.      public  int add (int a, int b)
  6.     {
  7.         x = a + b;
  8.         y = x + b;
  9.         return 0;
  10.     }
  11. }    
  12. class Program
  13. {
  14.     static void Main(string[] args)
  15.     {
  16.         sum obj1 = new sum();
  17.         sum obj2 = new sum();   
  18.         int a = 2;
  19.         obj1.add(a, a + 1);
  20.         obj2.add(5, a);
  21.         Console.WriteLine(obj1.x + "  " + obj2.y);     
  22.         Console.ReadLine();
  23.     }
  24. }

a) 6, 9
b) 5, 9
c) 9, 10
d) 3, 2

View Answer

Answer: b [Reason:] Here, a = 2, a + 1 = 2 + 1 = 3. So, a = 2, b = 3. x = 2 + 3 = 5. y = 5 + 3 = 8. Similarly, a = 5, b = a + 1 = 4. y = 5 + 4 = 9. Output : 5, 9.

8. What will be the output of the following set of code?

  1. class static_out
  2. {
  3.     public static int x;
  4.     public  static int y;
  5.     public int add(int a, int b)
  6.     {
  7.         x = a + b;
  8.         y = x + b;
  9.         return 0;
  10.     }
  11. }    
  12. class Program
  13. {
  14.     static void Main(string[] args)
  15.     {
  16.         static_out obj1 = new static_out();
  17.         static_out obj2 = new static_out();   
  18.         int a = 2;
  19.         obj1.add(a, a + 1);
  20.         obj2.add(5, a);
  21.         Console.WriteLine(static_out.x + " " + static_out.y );     
  22.         Console.ReadLine();
  23.     }
  24. }

a) 7 7
b) 6 6
c) 7 9
d) 9 7

View Answer

Answer: c [Reason:] None. Output : 7, 9

9. Which of these access specifiers must be used for class so that it can be inherited by another sub class?
a) public
b) private
c) both public & private
d) none of the mentioned

View Answer

Answer: a [Reason:] None.

10. Which of the following statements are incorrect?
a) public members of class can be accessed by any code in the program
b) private members of class can only be accessed by other members of the class
c) private members of class can be inherited by a sub class, and become protected members in sub class
d) protected members of a class can be inherited by a sub class, and become private members of the sub class

View Answer

Answer: c [Reason:] private members of a class cannot be inherited by a sub class.

11. What will be the output of code snippet?

  1.  class test
  2.  {
  3.      public   int a;
  4.      public  int b;
  5.      public  test(int i, int j)
  6.      {
  7.          a = i;
  8.          b = j;
  9.      }
  10.      public void meth(test o)
  11.      {
  12.          o.a *= 2;
  13.          o.b /= 2;
  14.      }
  15.  }    
  16.  class Program
  17.  {
  18.      static void Main(string[] args)
  19.      {
  20.          test obj = new test(10, 20);
  21.          obj.meth(obj);
  22.          Console.WriteLine(obj.a + " " + obj.b);    
  23.          Console.ReadLine();
  24.      }
  25.  }

a) 20, 40
b) 40, 20
c) 20, 10
d) 10, 20

View Answer

Answer: c [Reason:] None. Output :20, 10

12. Accessibility modifiers defined in a class are?
a) public, private, protected
b) public, internal, protected internal.
c) public, private, internal, protected internal.
d) public, private, protected, internal, protected internal

View Answer

Answer: d [Reason:] None.

C# MCQ Set 2

1. Which of these methods of class String is used to extract a substring from a String object?
a) substring()
b) Substring()
c) SubString()
d) None of the mentioned

View Answer

Answer: b [Reason:] None.

2. What is the output for the given code snippet?

  1. class Program
  2. {
  3.     static void Main(string[] args)
  4.     {
  5.         String s1 = "one";
  6.         String s2 = string.Concat(s1 + " " + "two");
  7.         Console.WriteLine(s2);
  8.         Console.ReadLine();
  9.     }
  10. }

a) one
b) two
c) one two
d) two one

View Answer

Answer: c [Reason:] Two strings can be concatenated using Concat() method. Output: one two

3. Which of these methods of class String is used to remove leading and trailing whitespaces?
a) startsWith()
b) TrimEnd()
c) Trim()
d) TrimStart()

View Answer

Answer: c [Reason:] Removes white space from the string.

4. What will be the output of the given code snippet?

  1. class Program
  2. {
  3.     static void Main(string[] args)
  4.     {
  5.         String c = "  Hello World  ";
  6.         String s = c.Trim();
  7.         Console.WriteLine("""+s+""");
  8.         Console.ReadLine();
  9.     }
  10. }

a) ” Hello World ”
b) “HelloWorld”
c) “Hello World”
d) “Hello”

View Answer

Answer: c [Reason:] Trim() method is used to remove leading and trailing whitespaces in a string. Output: “Hello World”

5. What will be the output of the code snippet?

  1.  class Program
  2.  {
  3.      static void Main(string[] args)
  4.      {
  5.          String s1 = "CSHARP";
  6.          String s2 = s1.Replace('H','L');
  7.          Console.WriteLine(s2);
  8.          Console.ReadLine();
  9.      }
  10.  }

a) CSHAP
b) CSHP
c) CSHALP
d) CSHP

View Answer

Answer: c [Reason:] Replace() method replaces all occurrences of a single character in invoking strings with another character. s1.Replace(‘H’,’L’) replaces every occurrence of ‘H’ in CSHARP by ‘L’, giving CSHALP. Output: CSHALP

6. What will be the output of the code snippet?

  1.  class Program
  2.  {
  3.      static void Main(string[] args)
  4.      {
  5.          String s1 = "Hello World";
  6.          String s2 = s1.Substring(0, 4);
  7.          Console.WriteLine(s2);
  8.          Console.ReadLine();
  9.      }
  10.  }

a) Hello
b) Hell
c) H
d) Hello World

View Answer

Answer: b [Reason:] None. Output: Hell

7. What will be the output of the given code snippet?

  1.  class Program
  2.  {
  3.      static void Main(string[] args)
  4.      {
  5.          String s = "Hello World";
  6.          int i = s.IndexOf('o');
  7.          int j = s.LastIndexOf('l');
  8.          Console.WriteLine(i + " " + j);
  9.          Console.ReadLine();
  10.      }
  11.  }

a) 9 5
b) 4 9
c) 9 0
d) 9 4

View Answer

Answer: b [Reason:] None. Output: 4 9

8. What will be the output of the given code snippet?

  1. class Program
  2. {
  3.     static void Main(string[] args)
  4.     { 
  5.         String c = "i love Csharp";
  6.         bool a;
  7.         a = c.StartsWith("I");
  8.         Console.WriteLine(a);
  9.         Console.ReadLine();
  10.     }
  11. }

a) true
b) false
c) 0
d) 1

View Answer

Answer: b [Reason:] StartsWith() method is case sensitive “i” and “I” are treated differently, hence false is stored in a. Output: false

9. What will be the output of the given code snippet?

  1. class Program
  2. {
  3.     static void Main(string[] args)
  4.     { 
  5.         String []chars = {"z", "x", "y", "z", "y"};
  6.         for (int i = 0; i < chars.Length; ++i)
  7.         for (int j = i + 1; j < chars.Length; ++j)
  8.         if(chars[i].CompareTo(chars[j]) == 0)
  9.         Console.WriteLine(chars[j]);
  10.         Console.ReadLine();
  11.     }
  12. }

a) zx
b) xy
c) zy
d) yz

View Answer

Answer: c [Reason:] compareTo() function returns zero when both the strings are equal. It returns a value less than zero if the invoking string is less than the other string being compared and a value greater than zero if the invoking string is greater than the string compared to 4 Output: z y

10. What will be the output of the code snippet?

  1.  static void main(String args[])
  2.  {
  3.      char chars[] = {'a', 'b', 'c'};
  4.      String s = new String(chars);
  5.      Console.WriteLine(s);
  6.  }

a) a
b) b
c) ab
d) abc

View Answer

Answer = d [Reason:] None. Output: abc

11. What will be the output of the given code snippet?

  1.  static void Main(string[] args)
  2.  {
  3.      string s = " i love you";
  4.      Console.WriteLine(s.IndexOf('l') + "  " + s.lastIndexOf('o') + "  " + s.IndexOf('e'));
  5.      Console.ReadLine();
  6.  }

a) 3 5 7
b) 4 5 6
c) 3 9 6
d) 2 4 6

View Answer

Answer: c [Reason:] indexof(‘l’) and lastIndexof(‘o’) are pre-defined function which are used to get the index of first and last occurrence of the character pointed by l and c respectively in the given array. Output: 3, 9, 6

C# MCQ Set 3

1. Which of these clauses will be executed even if no exceptions are found?
a) throws
b) finally
c) throw
d) catch

View Answer

Answer: b [Reason:] finally keyword is used to define a set of instructions that will be executed irrespective of whether the exception is found or not.

2. A single try block must be followed by which of these?
a) finally
b) catch
c) Both finally & catch
d) None of the mentioned

View Answer

Answer: c [Reason:] Try block can be followed by any of finally or catch block, try block checks for exceptions and work is performed by finally and catch block as per the exception.

3. Which of these exceptions handles the divide by zero error?
a) ArithmeticException
b) MathException
c) IllegalAccessException
d) IllegarException

View Answer

Answer: a [Reason:] None.

4. Which of these exceptions will occur if we try to access the index of an array beyond its length?
a) ArithmeticException
b) ArrayException
c) ArrayArguementException
d) IndexOutOfRangeException

View Answer

Answer: d [Reason:] IndexOutOfRangeException is a built in exception that is caused when we try to access an index location which is beyond the length of an array.

5. What will be the output of the given code snippet?

  1.    class program
  2.    {
  3.        public static void Main(string[] args)
  4.        {
  5.            try 
  6.            {
  7.                int a = args.Length;
  8.                int b = 1 / a;
  9.                Console.WriteLine(a);
  10.            }
  11.            catch (ArithmeticException e) 
  12.            {
  13.                Console.WriteLine("1");
  14.            }
  15.            Console.ReadLine();
  16.        }
  17.    }

a) 0
b) 1
c) Compile time error
d) Runtime error

View Answer

Answer: b [Reason:] None.

6. What will be the output of given code snippet?

  1.  class program
  2.  {
  3.      public static void Main(string[] args)
  4.      {
  5.          try
  6.          {
  7.              throw new NullReferenceException("C");
  8.              Console.WriteLine("A");
  9.          }
  10.          catch (ArithmeticException e) 
  11.          {
  12.              Console.WriteLine("B");
  13.          }
  14.          Console.ReadLine();
  15.      }
  16.  }

a) A
b) B
c) Compile time error
d) Runtime error

View Answer

Answer: d [Reason:] Try block is throwing NullPointerException but the catch block is used to counter Arithmetic Exception. Hence NullPointerException occurs since no catch is there which can handle it, runtime error occurs.

7. What will be the output of the given code snippet?

  1.  class Program
  2.  {
  3.      public static void Main(string[] args)
  4.      {
  5.          try
  6.          {
  7.              int a = 1;
  8.              int b = 10 / a;
  9.              try
  10.              {
  11.                  if (a == 1)
  12.                      a = a / a - a;
  13.                  if (a == 2)
  14.                  {
  15.                      int[] c = { 1 };
  16.                      c[8] = 9;
  17.                  }
  18.              }
  19.              finally
  20.              {
  21.                  Console.WriteLine("A");
  22.              }
  23.         }
  24.         catch (IndexOutOfRangeException e)
  25.         {
  26.              Console.WriteLine("B");
  27.         }
  28.         Console.ReadLine();
  29.     }
  30.  }

a) A
b) B
c) AB
d) BA

View Answer

Answer: a [Reason:] The inner try block does not have a catch which can tackle IndexOutOfRangeException hence finally is executed which prints ‘A’. The outer try block does have catch for IndexOutOfBoundException exception but no such exception occurs in it hence its catch is never executed and only ‘A’ is printed.

8. What will be the output of the given code snippet?

  1.  class Program
  2.  {
  3.      public static void Main(string[] args)
  4.      {
  5.          try
  6.          {
  7.              int a = args.Length;
  8.              int b = 10 / a;
  9.              Console.WriteLine(a);
  10.              try
  11.              {
  12.                  if (a == 1)
  13.                  a = a / a - a;
  14.                  if (a == 2)
  15.                  {
  16.                      int[] c = { 1 };
  17.                      c[8] = 9;
  18.                  }
  19.              }
  20.              catch (IndexOutOfRangeException e)
  21.              {
  22.                  Console.WriteLine("TypeA");
  23.              }
  24.          }
  25.          catch (ArithmeticException e)
  26.          {
  27.              Console.WriteLine("TypeB");
  28.          }
  29.          Console.ReadLine();
  30.      }
  31.  }

a) TypeA
b) TypeB
c) 0TypeA
d) Compile time error

View Answer

Answer: b [Reason:] None.

9. Which of the following keywords is used by the calling function to guard against the exception that is thrown by called function?
a) try
b) throw
c) throws
d) catch

View Answer

Answer: c [Reason:] If a method is capable of causing an exception that it does not handle. It must specify this behaviour so that callers of the method can guard themselves against that exception. This is done by using throws clause in methods declaration.

10. Which of these classes is related to all the exceptions that are explicitly thrown?
a) Error
b) Exception
c) Throwable
d) Throw

View Answer

Answer: c [Reason:] None.

C# MCQ Set 4

1. Which of these keywords are used to implement synchronization?
a) synchronize
b) syn
c) synch
d) synchronized

View Answer

Answer: d [Reason:] None.

2. Which keyword is used for using the synchronization features defined by the Monitor class?
a) lock
b) synchronized
c) monitor
d) locked

View Answer

Answer: a [Reason:] The C# keyword lock is really just shorthand for using the synchronization features defined by the Monitor class, which is defined in the System.Threading namespace.

3. What is synchronization in reference to a thread?
a) Its a process of handling situations when two or more threads need access to a shared resource
b) Its a process by which many thread are able to access same shared resource simultaneously
c) Its a process by which a method is able to access many different threads simultaneously
d) Its a method that allow to many threads to access any information the require

View Answer

Answer: a [Reason:] When two or more threads need to access the same shared resource, they need some way to ensure that the resource will be used by only one thread at a time, the process by which this is achieved is called synchronization.

4. Which method is called when a thread is blocked from running temporarily?
a) Pulse()
b) PulseAll()
c) Wait()
d) Both Pulse() & Wait()

View Answer

Answer: c [Reason:] When a thread is temporarily blocked from running, it calls Wait( ). This causes the thread to go to sleep and the lock for that object to be released, allowing another thread to acquire the lock.

5. What kind of exception is being thrown if Wait(),Pulse() or PulseAll() iscalled from code that is not within synchronized code?
a) System I/O Exception
b) DivideByZero Exception
c) SynchronizationLockException
d) All of the mentioned

View Answer

Answer: c [Reason:] A SynchronizationLockException will be thrown if Wait(), Pulse(), or PulseAll() is called from code that is not within synchronized code, such as a lock block.

6. What is mutex?
a) a mutually exclusive synchronization object
b) can be acquired by more than one thread at a time
c) helps in sharing of resource which can be used by one thread
d) all of the mentioned

View Answer

Answer: a [Reason:] A mutex is a mutually exclusive synchronization object. This means it can be acquired by one and only one thread at a time. The mutex is designed for those situations in which a shared resource can be used by only one thread at a time.

7. What is Semaphore?
a) Grant more than one thread access to a shared resource at the same time
b) Useful when a collection of resources is being synchronized
c) Make use of a counter to control access to a shared resource
d) All of the mentioned

View Answer

Answer: d [Reason:] A semaphore is similar to a mutex except that it can grant more than one thread access to a shared resource at the same time. Thus, the semaphore is useful when a collection of resources is being synchronized. A semaphore controls access to a shared resource through the use of a counter. If the counter is greater than zero, then access is allowed. If it is zero, access is denied.

8. Which method is used to abort thread prior to it’s normal execution?
a) sleep()
b) terminate()
c) suspend()
d) Abort()

View Answer

Answer: d [Reason:] To terminate a thread prior to its normal conclusion, use Thread.Abort( ). Its simplest form is shown here: public void Abort() Abort() causes a ThreadAbortException to be thrown to the thread on which Abort() is called. This exception causes the thread to terminate.

9. Which of these statements is incorrect?
a) By multithreading CPU’s idle time is minimized, and we can take maximum use of it
b) By multitasking CPU’s idle time is minimized, and we can take maximum use of it
c) Two thread in Csharp can have same priority
d) A thread can exist only in two states, running and blocked

View Answer

Answer: d [Reason:] Thread exist in several states, a thread can be running, suspended, blocked, terminated & ready to run.

10. What is multithreaded programming?
a) It’s a process in which two different processes run simultaneously
b) It’s a process in which two or more parts of same process run simultaneously
c) Its a process in which many different process are able to access same information
d) Its a process in which a single process can access information from many sources

View Answer

Answer: b [Reason:] Multithreaded programming a process in which two or more parts of same process run simultaneously.

C# MCQ Set 5

1. Select the relevant output for the following set of code :

  1.  static void Main(string[] args)
  2.  {
  3.      byte varA = 10;
  4.      byte varB = 20;
  5.      long result = varA & varB;
  6.      Console.WriteLine("{0}  AND  {1} Result :{2}", varA, varB, result);
  7.      varA = 10;
  8.      varB = 10;
  9.      result = varA & varB;
  10.      Console.WriteLine("{0}  AND  {1} Result : {2}", varA, varB, result);
  11.      Console.ReadLine();
  12.  }

a) 0, 20
b) 10, 10
c) 0, 10
d) 0, 0

View Answer

Answer: c [Reason:] When ‘OR’ operations is done on the binary values following are the results of OR. ‘OR’ means addition(+) operation. 0 (false) + 0(false) = 0 (false) 1 (True) + 0(false) = 1 (True) 0(false) + 1(True) = 1 (True) 1(True) + 1(True) = 1 (True) When using OR operation it gives FALSE only when both the values are FALSE. In all other cases ‘OR’ operation gives ‘true’. Output : 10 AND 20 Result :0. 10 AND 10 Result :10.

2. Select the relevant output for the following set of code :

  1.  public static void Main() 
  2.  {
  3.      byte varA = 10;
  4.      byte varB = 20;
  5.      long result = varA | varB; 
  6.      Console.WriteLine("{0}  OR  {1} Result :{2}", varA, varB, result);
  7.      varA = 10;
  8.      varB = 10;
  9.      result = varA | varB;  
  10.      Console.WriteLine("{0}  OR  {1} Result : {2}", varA, varB, result);
  11.  }

a) 20, 10
b) 30, 10
c) 10, 20
d) 10, 10

View Answer

Answer: b [Reason:] There are two kinds of Shift operations “Right Shift” and “Left Shift”. Right Shift operation is used for shifting the bit positions towards right side.Left Shift operation is used for shifting the bit positions towards left side. When Right Shift operations are done on a binary value the bits are shifted one position towards the right. Output :10 OR 20 Result :30. 10 OR 10 Result :10.

3. Select the output for the following set of Code:

  1.  static void Main(string[] args)
  2.  {
  3.      byte b1 = 0 * AB;
  4.      byte b2 = 0 * 99;
  5.      byte temp;
  6.      temp = (byte) ~b2;
  7.      Console.Write( temp + " ");
  8.      temp = (byte) (b1 << b2);
  9.      Console.Write(temp + " ");
  10.      temp = (byte)(b2  >> 2);
  11.      Console.WriteLine(temp);
  12.      Console.ReadLine();
  13.  }

a) 101 0 34
b) 103 2 38
c) 102 0 38
d) 101 1 35

View Answer

Answer: c [Reason:] None. Output:102 0 38.

4. Which of the following options is not a Bitwise Operator in C#?
a) &, |
b) ^, ~
c) <<, >>
d) +=, -=

View Answer

Answer: d [Reason:] +=, -= are Assignment Operators in C#.

5. Select the output for the following set of Code:

  1.   bool a = true;
  2.   bool b = false;
  3.   a |= b;
  4.   Console.WriteLine(a);
  5.   Console.ReadLine();

a) 0
b) 1
c) True
d) False

View Answer

Answer: c [Reason:] ‘bools’ are single bits, and so a bit-wise OR is the same as a logical OR. Output : True.

6. Select the relevant code set to fill up the blank for the following program :

  1.   static void Main(string[] args)
  2.   {
  3.       int x = 10, y = 20;
  4.       int res;
  5.       /*_______________*/ 
  6.       Console.WriteLine(res);
  7.   }

a) x % y == 0 ? (x == y ? (x += 2):(y = x + y)):y = y*10;
b) x % y == 0 ? y += 10:(x += 10);
c) x % y == 0 ? return(x) : return (y);
d) All of the mentioned.

View Answer

Answer: b [Reason:] None. Output : { int x = 10, y = 20; int res; x % y == 0 ? y += 10:(x += 10); Console.WriteLine(res); }

7. Select the output for the following set of code:

  1.  static void Main(string[] args)
  2.  {
  3.      int y = 5;
  4.      int x;
  5.      int k = (!(Convert.ToInt32(y) > 10))?  x = y + 3 : x = y + 10;
  6.      Console.WriteLine(x);
  7.      Console.WriteLine(y);
  8.      Console.ReadLine();
  9.  }

a) 5, 8
b) 10, 4
c) 8, 5
d) 11, 8

View Answer

Answer: c [Reason:] Since condition y > 10 is false and !(false) = true .So, first statement x = y + 3 is executed which is x = 8 with y = 5. Output: 8, 5.

8. Which among the following is a conditional operator ?
a) ‘:?’
b) ?;
c) ?:
d) ??

View Answer

Answer: c [Reason:] By definition.

9. Select the Output for the following set of code :

  1. public static void Main(string[] args)
  2. {
  3.     int a = 4;
  4.     int c = 2;
  5.     bool b = (a % c == 0 ? true : false);
  6.     Console.WriteLine(b.ToString());
  7.     if (a/c == 2)
  8.     {
  9.         Console.WriteLine("true");
  10.     }
  11.     else
  12.     {
  13.         Console.WriteLine("false");
  14.     }
  15.     Console.ReadLine();
  16. }

a) True
False
b) False
True
c) True
True
d) False
False

View Answer

Answer: c [Reason:] a % c == 0 condition is true as (4 % 2 == 0). So, b is evaluated as true.Now (a/c == 2) which means if condition is also true hence it is evaluated as true. Output: True True

10. Arrange the operators in the increasing order as defined in C#:
!=, ?:, &, ++, &&
a) ?: < && < != < & < ++
b) ?: < && < != < ++ < &
c) ?: < && < & <!= < ++
d) ?: < && < != < & < ++

View Answer

Answer: c [Reason:] By definition.