Welcome to the Arrays and Strings MCQs Page
Dive deep into the fascinating world of Arrays and Strings with our comprehensive set of Multiple-Choice Questions (MCQs). This page is dedicated to exploring the fundamental concepts and intricacies of Arrays and Strings, a crucial aspect of C# programming. In this section, you will encounter a diverse range of MCQs that cover various aspects of Arrays and Strings, 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 Arrays and Strings. 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 Arrays and Strings. You can click on an option to test your knowledge before viewing the solution for a MCQ. Happy learning!
Arrays and Strings MCQs | Page 12 of 16
Explore more Topics under C# programming
static Void main(string[] args)
{
int a = 5;
int b = 6;
float c = 7.2f;
math (ref a, ref b, ref c);
Console.WriteLine(a + " " + b + " " + c);
}
static int math(/*add parameter decelaration */)
{
a += b;
b *= (int)c;
c += a * b;
return 0;
}
static void Main(string[] args)
{
object[] a = {" 1 ", 4.0f, " harsh "};
fun(a);
Console.ReadLine();
}
static void fun(params object[] b)
{
for (int i = 0; i < b.Length - 1; i++)
Console.WriteLine(b[i] + " ");
}
static void Main(string[] args)
{
int [] a = {1, 2, 3, 4, 5};
fun(a);
Console.ReadLine();
}
static void fun(params int[] b )
{
int[] k = { 3, 4, 7, 8,'\0' };
for (int i = 0; i < b.Length; i++)
{
b[i] = b[i] + k[i] ;
Console.WriteLine( b[i] + " ");
}
}
static void Main(string[] args)
{
int [] a = {1, 2, 3, 4, 5};
fun(a);
Console.ReadLine();
}
static void fun(params int[] b )
{
for (int i = 0; i < b.Length; i++)
{
b[i] = b[i] * 5 ;
Console.WriteLine(b[i] + "");
}
}
static void Main(string[] args)
{
int[] a = { 2, 21, 34, 46, 85, 88, 90};
fun(a);
Console.WriteLine(a + " ");
Console.ReadLine();
}
static void fun(params int [] b )
{
int [] c = { 1, 2, 3, 4, 5, 6, 7};
int i ;
for (i = 0 ;i < b.Length ;i++)
if (b[i] % 2 == 0)
{
c[i] = b[i];
}
Console.WriteLine("even numbers are:");
for (i = 0 ;i <= b.Length ;i++)
{
Console.WriteLine(c[i]);
}
}
{
}
static void Main(string[] args)
{
int[] x = { 80, 82, 65, 72, 83, 67 };
fun(x);
Console.ReadLine();
}
static void fun(params int [] b )
{
int i;
for (i = 5; i >=0 ; i--)
{
Console.WriteLine(Convert.ToChar(b[i]));
}
}
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!
Software Engineering
Learn about the systematic approach to developing software with our Software...
Operating System
Dive deep into the core of computers with our Operating System MCQs. Learn about...
Cyber Security
Understand the fundamentals of safeguarding digital assets with our Cyber Security...