NGM College Department of Computer Science (SF) 16UCS517 DOT NET Programming K1 Level Multiple Choice Questions With Answers Unit-I
NGM College Department of Computer Science (SF) 16UCS517 DOT NET Programming K1 Level Multiple Choice Questions With Answers Unit-I
Unit-I
A.Serial
B. Local
C. Private
D. Static
ANSWER : Option B
2. Which is the String method used to compare two strings with each other ?
A. Compare To()
B. Compare()
C. Copy()
D. ConCat()
Answer: Option B
3. Minimum and Maximum range of values supported by ‘float’ data type are ?
Answer: Option C
4. Which datatype should be more preferred for storing a simple number like 35 to improve execution
speed of a program?
A. sbyte
B. short
C. int
D. long
Answer: Option A
char a = 'A';
string b = "a";
Console.WriteLine(Convert.ToInt32(a));
Console.WriteLine(Convert.ToInt32(Convert.Tochar(b)));
Console.ReadLine();
A. 1, 97
B. 65, 97
C. 65, 97
D. 97, 1
Answer: Option C
6. 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. a
B. b
C. a, b
Answer: Option A
7. Type of Conversion in which compiler is unable to convert the datatype implicitly is ?
A. ushort to long
B. int to uint
C. ushort to long
D. byte to decimal
Answer: Option B
A. Dr.Gupta
B. Good Morning
B. Long
C. Short
D. Byte
Answer: Option B
B. Byte
C. Integer
D. Short
Answer: Option A
Unit-II
B. 1, 3, 5
C. 2, 4
D. 3, 5
Answer: Option B
B. Integer
C. Long
D. Byte
Answer: Option D
B. 8 byte
C. 16 byte
D. 32 byte
Answer: Option C
B. 4 Bytes
C. 10 Bytes
D. 16 Bytes
Answer: Option D
D. To implement an interface member, the corresponding member in the class must be public as well
as static.
Answer: Option C
B. 2, 4
C. 3, 5
D. 4 only
Answer: Option B
17. 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);
A. ARE
B. CRE
C. CR
D. REA
Answer: Option B
18.If s1 and s2 are references to two strings, then which of the following is the correct way to compare the
two references?
A. s1 is s2
B. s1 = s2
C. s1.Equals(s2)
D. strcmp(s1, s2)
Answer: Option C
19.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);
A. 20
B. 4
C. 18
D. 10
Answer: Option C
Unit-III
B. 2, 4
C. 3, 5
D. 4, 5
Answer: Option C
B. /=
C. *=
D. +=
Answer: Option A
22. A GUI:
Answer: d
a.) debugging.
Answer: d
Answer: a
Answer: c
Answer: a
Answer: d
28. Which sequence of char data types is listed from lowest to highest?
a.) a, A, z, Z
b.) a, z, A, Z
c.) A, a, Z, z
d.) A, Z, a, z
Answer: d
a.) is unsigned.
Answer: d
Answer: b
Unit-IV
Answer: b
a.) A AND A
b.) A AND B
c.) B AND A
d.) B AND B
Answer: d
b.) AND
c.) XOR
d.) OR
Answer: a
34. In the For…Next statement the default value for the Step is:
a.) -1
b.) 0
c.) 1
d.) 2
Answer: c
a.) Event
b.) Function
c.) Sub
Answer: d
b.) splits the logic to solve a problem into small, manageable units.
Answer: d
37. Which method will return the number of elements in an array?
a.) Dimension
b.) Length
c.) Number
d.) Size
Answer: b
Answer: d
39. Which method will arrange the elements of an array in alphabetical order?
a.) Arrange
b.) Assemble
c.) Order
d.) Sort
Answer: d
a.) PrintDialog
b.) PrintPreview
c.) PageSetupDialog
Answer: b
Unit-V
a.) OleDbDataAdapter
b.) SQLDataAdapter
c.) QueryDataAdapter
Answer: c
Answer: b
Answer: d
Answer: d
45. Which set of symbols are used to signify the presence of ASP.NET code?
a.) <@
b.) <#
c.) <$
d.) <%
Answer: d
a.) asn
b.) asp
c.) aspn
d.) aspx
Answer: d
47. What is the extension for a Visual Basic web form interface file?
a.) .asp
b.) .aspx
c.) .asp.vb
d.) .aspx.vb
Answer: b
48. When an ASP.NET file is placed on an IIS server and viewed through a browser, the resulting HTML
page contains:
Answer: d
49. What is the extension for a Visual Basic web form code file?
a.) .asp
b.) .aspx
c.) .asp.vb
d.) .aspx.vb
Answer: d
a.) A href
b.) A ref
c.) An href
d.) An ref
Answer: a
NGM College
Unit-I
Colon is used as inheritance operator in C#. Just place a colon and then the class name.
2. Why can't you specify the accessibility modifier for methods inside the interface?
In an interface, we have virtual methods that do not have method definition. All the methods are there to
be overridden in the derived class. That's why they all are public.
3. How can we set class to be inherited, but prevent the method from being over-ridden?
Declare the class as public and make the method sealed to prevent it from being overridden.
C# is managed code because Common language runtime can compile C# code to Intermediate language.
They are used to organize large code projects. “System” is the most widely used namespace in C#. We
can create our own namespace and use one namespace in another, which are called Nested Namespaces.
They are denoted by the keyword “namespace”.
7. Explain Abstraction.
Abstraction is one of the OOP concepts. It is used to display only the essential features of the class and
hides the unnecessary information.
8. Name some properties of Array.
Unit-II
“Using” statement calls – “dispose” method internally, whenever any exception occurred in any method
call and in “Using” statement objects are read only and cannot be reassignable or modifiable.
“Const” keyword is used for making an entity constant. We can’t reassign the value to constant.
If the elements of an array is an array then it’s called as jagged array. The elements can be of different
sizes and dimensions.
14. How we can sort the array elements in descending order in C#?
“Sort()” method is used with “Reverse()” to sort the array in descending order.
For
While
Do.. While
C# Compiler is – CSC.
The DirectoryInfo class is derived from the FileSystemInfo class. It has various methods for creating,
moving, and browsing through directories and subdirectories. This class cannot be inherited.
· C#
· VB.Net
· COBOL
· Perl
Unit-III
Hiding a base class method by declaring a method in derived class with keyword new. This will
override the base class method and old method will be suppressed.
When overriding a method, you change the behavior of the method for the derived class.
Overloading a method simply involves having another method with the same name within the class.
Int32.Parse(string)
Convert.ToInt32()
System.Data
System.Data.OleDB
System.Data.SQLClient
25. Which is the base class for all the classes in .NET Framework?
The System.Object class
The Windows Forms Controls to Select Data from a List are as follows:
1. CheckedListBox
2. ComboBox
3. DomainUpDown
4. List Box
5. List View
Unit-IV
34. Can you specify the accessibility modifier for methods inside the interface?
All the methods inside an interface are always public, by default. You cannot specify any other
access modifier for them.
35. Is it possible for a class to inherit the constructor of its base class?
You can prevent a class from overriding in VB.NET by using the NotInheritable keyword.
The Control class or System.Windows.Forms.Control class is the parent class for all Window controls.
Unit-V
41. Name the method that needs to be invoked on the DataAdapter control to fill the
generated DataSetwith data?
43. Which adapter should you use, if you want to get the data from an Access database?
Page object has an "IsPostBack" property, which can be checked to know that is the page posted back.
The System.Web.UI.Control class is the parent class for all Web server controls.
46. Can you set which type of comparison you want to perform by the CompareValidator control?
47. Which method is used to force all the validation controls to run?
The Page.Validate() method is used to force all the validation controls to run and to perform validation.
A content page does not have complete HTML source code; whereas a master page has complete HTML
source code inside its source file.
49. Which method is used to post a Web page to another Web page?
The Respose.Redirect method is used to post a page to another page, as shown in the following code
snippet: Response.Redirect("DestinationPageName.aspx");
The data types supported by the RangeValidator control are Integer, Double, String, Currency, and Date.
NGM College
K3 Level Questions
UNIT-I
UNIT-II
UNIT-IV
UNIT-I
1. Examine .NET framework. Explain its various components with neat sketch.
2. Elucidate the different datatypes in C#.
3. Explain about method overloading in C# with an example.
4. Categorize the Arrays in C#.
5. Explain the different types of applications in .NET with suitable examples.
UNIT-II
UNIT-III
11. Explain the applications of MessageBox. List all its enumerations with examples.
12. Categorize various stream classes used for File Input/Output in VB.NET.
13. Explain FileIO. List the various classes and their methods used for handling the FileIO.
14. Explain about classes and objects in VB.NET.
15. Elucidate Multithreading in VB.NET. List its advantages.
UNIT-IV
16. Explain the various classes used for database connection in ADO.NET.
17. Explain about VB.NET IDE. List its various components and their applications.
18. List any ten controls in VB.NET. Explain their properties and methods.
19. Explain MenuStrip control. Name the classes used to handle standard menu.
20. Explain about Irregular forms in VB.NET.
UNIT-V