Home / CSE MCQs / C#.Net MCQs :: Discussion

Discussion :: C#.Net MCQs

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

    static void Main(string[] args)
      {
          int x = 10, y = 20;
          int res;
          /*_______________*/ 
          Console.WriteLine(res);
      }
  2. 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

    Workspace

    Answer : Option B

    Explanation :

    { int x = 10, y = 20; int res; x % y == 0 ? y += 10:(x += 10); Console.WriteLine(res); }


Be The First To Comment