Welcome to the Control Instructions MCQs Page
Dive deep into the fascinating world of Control Instructions with our comprehensive set of Multiple-Choice Questions (MCQs). This page is dedicated to exploring the fundamental concepts and intricacies of Control Instructions, a crucial aspect of C# programming. In this section, you will encounter a diverse range of MCQs that cover various aspects of Control Instructions, 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.
Check out the MCQs below to embark on an enriching journey through Control Instructions. 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 Control Instructions. You can click on an option to test your knowledge before viewing the solution for a MCQ. Happy learning!
Control Instructions MCQs | Page 8 of 9
Explore more Topics under C# programming
static void Main(string[] args)
{
long x;
x = Convert.ToInt32(Console.ReadLine());
do
{
Console.WriteLine(x % 10);
}while ((x = x / 10) != 0);
Console.ReadLine();
}
enter x = 1234.
static void Main(string[] args)
{
int i, s = 0, a = 1, d;
i = Convert.ToInt32(Console.ReadLine());
do
{
d = i % (2 * 4);
s = s + d * a;
}while ((Convert.ToInt32(i = i / (2 * 4))) != 0 && (Convert.ToBoolean(Convert.ToInt32((a) = (a * 10)))));
Console.WriteLine(s);
Console.ReadLine();
}
enter i = 342.
a)
do;
{
statement;
}while (condition);
b)
do(condition)
{
statement;
}while;
c)
do
{
statement;
}while (condition)
d)
do
{
statement;
}while (condition);
static void Main(string[] args)
{
int x = 10;
do
{
Console.WriteLine( x++);
}
while(Convert.ToBoolean(5) && Convert.ToBoolean(4) && Convert.ToBoolean(3) && Convert.ToBoolean(2) && Convert.ToBoolean(1) && Convert.ToBoolean(0));
Console.ReadLine();
}
static void Main(string[] args)
{
int x;
for (x = 10; x <= 15; x++)
while (Convert.ToBoolean(Convert.ToInt32(x)))
{
do
{
Console.WriteLine(1);
if (Convert.ToBoolean(x >> 1))
continue;
}while (Convert.ToBoolean(0));
break;
}
Console.ReadLine();
}
static void Main(string[] args)
{
int x = 0;
do
{
x++;
if (x == 5)
{
x++;
continue;
break;
}
Console.WriteLine(x + " ");
}
}while (x < 10);
static void Main(string[] args)
{
int x;
for (x = 1; x <= 3; x++)
{
int j = 1;
do
{
j++;
}while (x % j == 2);
Console.WriteLine(x + " " + j);
}
Console.ReadLine();
}
static void Main(string[] args)
{
int i;
Console.WriteLine("enter value of i:");
i = Convert.ToInt32(Console.ReadLine());
if ( i % 2 == 0)
goto even:
else
{
Console.WriteLine("number is odd:");
Console.ReadLine();
}
even:
Console.WriteLine("number is even:");
Console.ReadLine();
}
for i = 4.
static void Main(string[] args)
{
int i;
Console.WriteLine("enter value of i:");
i = Convert.ToInt32(Console.ReadLine());
if ( i % 2 == 0)
goto even:
else
{
Console.WriteLine("number is odd:");
Console.ReadLine();
}
even:
Console.WriteLine("number is even:");
Console.ReadLine();
}
for i = 4.
static void Main(string[] args)
{
int i = 1, j;
do
{
for (j = 1; ; j++)
{
if (j > 2)
break;
if (i == j)
continue;
Console.WriteLine(i + " " + j);
}
i++;
} while (i < 3);
Console.ReadLine();
}
2 1
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!
Microprocessor
Understand the heart of your computer with our Microprocessor MCQs. Topics include...
Java Programming
Level up your coding skills with our Java Programming MCQs. From object-oriented...