Net Programming Set 1
On This Page
This set of .NET Programming Multiple Choice Questions & Answers (MCQs) focuses on Net Programming Set 1
Q1 | A variable which is declared inside a method is called a________variable
- Serial
- Local
- Private
- Static
Q2 | Which is the String method used to compare two strings with each other ?
- Compare To()
- Compare()
- Copy()
- ConCat()
Q3 | Minimum and Maximum range of values supported by ‘float’ data type are ?
- 1.5 * 10 ^-40 to 3.4 * 10 ^38
- 1.5 * 10 ^-45 to 3.4 * 10 ^30
- 1.5 * 10 ^-45 to 3.4 * 10 ^38
- 1.5 * 10 ^-45 to 3.4 * 10 ^37
Q4 | Which datatype should be more preferred for storing a simple number like 35 to improve execution speed of a program?
- sbyte
- short
- int
- long
Q5 | 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();}
- 1, 97
- 65, 97
- 65, 97
- 97, 1
Q6 | Scope of variable is related to definition of variable as:1. Region of code within which variable value is valid and hence can be accessed.2. No, relation with region where variable is declared its value is valid in entire scope.
- a
- b
- a, b
- None of the mentioned
Q7 | Type of Conversion in which compiler is unable to convert the datatype implicitly is ?
- ushort to long
- int to uint
- ushort to long
- byte to decimal
Q8 | Select output of the given set of Code :static void Main(string[] args){String name = "Dr.Gupta";Console.WriteLine("Good Morning" + name);}
- Dr.Gupta
- Good Morning
- Good Morning Dr.Gupta
- Good Morning name
Q9 | Which of the following is an 8-byte Integer?
- Char
- Long
- Short
- Byte
Q10 | Which of the following is NOT an Integer?
- Char
- Byte
- Integer
- Short
Q11 | Which of the following are value types?1.Integer2.Array3.Single4.String5.Long
- 1, 2, 5
- 1, 3, 5
- 2, 4
- 3, 5
Q12 | Which of the following does not store a sign?
- Short
- Integer
- Long
- Byte
Q13 | What is the size of a Decimal?
- 4 byte
- 8 byte
- 16 byte
- 32 byte
Q14 | Which of the following is the correct size of a Decimal datatype?
- 8 Bytes
- 4 Bytes
- 10 Bytes
- 16 Bytes
Q15 | Which of the following statements is correct?
- When a class inherits an interface it inherits member definitions as well as its implementations.
- An interface cannot contain the signature of an indexer.
- Interfaces members are automatically public.
- To implement an interface member, the corresponding member in the class must be public as well as static.
Q16 | Which of the following can implement an interface?1.Data2.Class3.Enum4.Structure5.Namespace
- 1, 3
- 2, 4
- 3, 5
- 4 only
Q17 | Which of the following will be the correct output for the C#.NET code snippet given below?String s1 = "ALL MEN ARE CREATED EQUAL";String s2;s2 = s1.Substring(12, 3);Console.WriteLine(s2);
- ARE
- CRE
- CR
- REA
Q18 | If s1 and s2 are references to two strings, then which of the following is the correct way to compare the two references?
- s1 is s2
- s1 = s2
- s1.Equals(s2)
- strcmp(s1, s2)
Q19 | Which of the following is the correct output of the C#.NET code snippet given below?int[ , , ] a = new int[ 3, 2, 3 ];Console.WriteLine(a.Length);
- 20
- 4
- 18
- 10
Q20 | Which of the following are NOT Relational operators in C#.NET?1.>=2.!=3.Not4.<=5.<>=
- 1, 3
- 2, 4
- 3, 5
- 4, 5
Q21 | Which of the following is NOT an Assignment operator in C#.NET?
- \=
- /=
- *=
- +=
Q22 | A GUI:
- uses buttons, menus, and icons.
- should be easy for a user to manipulate.
- stands for Graphic Use Interaction.
- Both a and b.
Q23 | Visual Studio .NET provides which feature:
- debugging.
- application deployment.
- syntax checking.
- All of the above..
Q24 | What does IDE stand for?
- Integrated Development Environment
- Integrated Design Environment
- Interior Development Environment
- Interior Design Environment
Q25 | Which is not a main component of the Visual Studio IDE?
- Solution Explorer
- Tool Box
- Start Menu
- Designer Window