adplus-dvertising

Welcome to the Data Types,Variables and Operators MCQs Page

Dive deep into the fascinating world of Data Types,Variables and Operators with our comprehensive set of Multiple-Choice Questions (MCQs). This page is dedicated to exploring the fundamental concepts and intricacies of Data Types,Variables and Operators, a crucial aspect of C# programming. In this section, you will encounter a diverse range of MCQs that cover various aspects of Data Types,Variables and Operators, from the basic principles to advanced topics. Each question is thoughtfully crafted to challenge your knowledge and deepen your understanding of this critical subcategory within C# programming.

frame-decoration

Check out the MCQs below to embark on an enriching journey through Data Types,Variables and Operators. Test your knowledge, expand your horizons, and solidify your grasp on this vital area of C# programming.

Note: Each MCQ comes with multiple answer choices. Select the most appropriate option and test your understanding of Data Types,Variables and Operators. You can click on an option to test your knowledge before viewing the solution for a MCQ. Happy learning!

Data Types,Variables and Operators MCQs | Page 9 of 14

Explore more Topics under C# programming

Q81.
Are the given codes :

1. Myclass class;
Myclass class2 = null;
2. int i;
int j = 0;
Discuss
Answer: (c).Both (1) and (2) are equivalents
Q82.
What is the output of following set of code ?
int a,b;
  a = (b = 10) + 5;
Discuss
Answer: (c).a = 15, b = 10
Q83.
What will be output of the following conversion ?
static void Main(string[] args)
 {
     char a = 'A';
     string b = "a";
     Console.WriteLine(Convert.ToInt32(a));
     Console.WriteLine(Convert.ToInt32(Convert.Tochar(b)));
     Console.ReadLine();
 }
Discuss
Answer: (c).65, 97
Q84.
Select output of the given set of Code :
static void Main(string[] args)
{
    String name = "Dr.Gupta";
    Console.WriteLine("Good Morning" + name);
}
Discuss
Answer: (c).Good Morning Dr.Gupta
Q85.
Select output for the following set of code.
static void Main(string[] args)
 {
     int a = 5;
     int b = 10;
     int c;
     Console.WriteLine(c = a-- - ++b);
     Console.WriteLine(b);
     Console.ReadLine();
 }
Discuss
Answer: (c).-6, 11
Q86.
Select output for the following set of code .
static void Main(string[] args)
 {
     const int a = 5;
     const int b = 6;
     for (int i = 1; i <= 5; i++)
     {
         a = a * i;
         b = b * i;
     }
     Console.WriteLine(a);
     Console.WriteLine(b);
     Console.ReadLine();
 }
Discuss
Answer: (b).Compile time error.
Q87.
Select output for the following set of code.
static void Main(string[] args)
 {
     string Name = "He is playing in a ground.";
     char[] characters = Name.ToCharArray();
     StringBuilder sb = new StringBuilder();
     for (int i = Name.Length - 1; i >= 0; --i)
     {
         sb.Append(characters[i]);
     }
     Console.Write(sb.ToString());
     Console.ReadLine(); 
 }
Discuss
Answer: (c)..dnuorg a ni gniyalp si eH
Discuss
Answer: (b).m = static variable, n = instance variable, x = value parameter, y = reference parameter, j = local variable, z =output parameter , a[0] = array element
Q89.
Correct Output for the given set of programming code is :
class Program
{
    static void Main(string[] args)
    {
        int  i ;
        for (i = 0; i < 5; i++)
        {
            Console.WriteLine(i);
        }
        Console.ReadLine();
    }
}
Discuss
Answer: (c).0, 1, 2, 3, 4
Q90.
Correct Output for the given set of programming code is :
class Program
 {
     static void Main(string[] args)
     {
         int i;
         for ( i = 0; i < 5; i++)
         {
 
         }
         Console. WriteLine(i);
         Console. ReadLine();
     }
}
Discuss
Answer: (c).5

Suggested Topics

Are you eager to expand your knowledge beyond C# programming? We've curated a selection of related categories that you might find intriguing.

Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!