.Net Programming (3340704) MCQs

MCQs of Advanced Features of VB.Net

Showing 31 to 40 out of 41 Questions
31.
An exception may be generated due to ___________
exception જનરેટ થવાના કારણો _________
(a) Invalid input
ઈનવેલીડ ઈનપુટ
(b) Invalid output
ઇનવેલીડ આઉટપુટ
(c) Save memory
સેવ મેમરી
(d) None of the above
ઉપરના માંથી એક પણ નહિ
Answer:

Option (a)

32.
There can be a try block without catch block but vice versa is not possible
catch બ્લોક વગર try બ્લોક હોઈ શકે છે પરંતુ તેનાથી ઉલટું શક્ય છે કે નહિ ?
(a) YES
હા
(b) NO
ના
Answer:

Option (a)

33.
How many catch block can a single try block can have ?
એક try બ્લોક માં કેટલા catch બ્લોક હોઈ શકે છે ?
(a) 1
(b) 2
(c) 15
(d) As much as we needed
જેટલા આપણે જોઈએ તેટલા
Answer:

Option (d)

34.
Finally block is executed ________
Finally બ્લોક એક્ષીક્યુટ ક્યારે થશે ?
(a) If the exception is occurred
જો exception જનરેટ થાય તો
(b) If the exception is not occurred
જો exception જનરેટ ના થાય તો
(c) Whenever the required
જયારે જરૂર હોય ત્યારે
(d) Each and every time, when program is execute
જયારે પ્રોગ્રામ એક્ષીક્યુટ થાય ત્યારે દર વખતે
Answer:

Option (d)

35.
Guess the output of the following code;
Module Program
    Sub Main(args As String())
        Dim a As Integer = 1
        Dim b As Integer = 10 / a
        Try
            If a = 1 Then
                a = 10 / (a - a)
            End If
        Catch e As OverflowException
            Console.Write("B")
        Finally
            Console.Write("A")
        End Try
        Console.ReadLine()
    End Sub
End Module
નીચેના પ્રોગ્રામ નું આઉટપુટ જણાવો;
Module Program
    Sub Main(args As String())
        Dim a As Integer = 1
        Dim b As Integer = 10 / a
        Try
            If a = 1 Then
                a = 10 / (a - a)
            End If
        Catch e As OverflowException
            Console.Write("B")
        Finally
            Console.Write("A")
        End Try
        Console.ReadLine()
    End Sub
End Module
(a) A
(b) AB
(c) BA
(d) B
Answer:

Option (c)

36.
________________ statement is used to handle unstructured exception handling
______ સ્ટેટમેન્ટ નો ઉપયોગ unstructured exception હેન્ડલ કરવા માટે થાય છે
(a) On Error GoTo
(b) Try
(c) Throw
(d) Catch
Answer:

Option (a)

37.
Guess the output of the following code;
Module Program
    Sub Main(args As String())
        On Error GoTo Handler
        Dim a As Integer = 0
        Dim b As Integer = 156
        Dim ans As Integer
        ans = b / a
        Console.WriteLine("Press Enter to continue...")
        Console.ReadLine()
Handler:
        Console.WriteLine("Exception Generated...")
    End Sub
End Module
નીચેના પ્રોગ્રામ નું આઉટપુટ જણાવો;
Module Program
    Sub Main(args As String())
        On Error GoTo Handler
        Dim a As Integer = 0
        Dim b As Integer = 156
        Dim ans As Integer
        ans = b / a
        Console.WriteLine("Press Enter to continue...")
        Console.ReadLine()
Handler:
        Console.WriteLine("Exception Generated...")
    End Sub
End Module
(a) Press Enter to continue...
(b) Exception Generated…
(c)
Press Enter to continue…
Exception Generated...
Press Enter to continue…
Exception Generated...
(d)
Exception Generated…
Press Enter to continue…
Exception Generated…
Press Enter to continue…
Answer:

Option (b)

38.
Guess the output of the following code;
Module Program
    Sub Main(args As String())
        On Error GoTo Handler
        Dim a As Integer = 0
        Dim b As Integer = 156
        Dim ans As Integer
        ans = b / a
        Console.WriteLine("Press Enter to continue...")
        Exit Sub
Handler:
        Console.WriteLine("Exception Generated...")
        Resume Next
    End Sub
End Module
નીચેના પ્રોગ્રામ નું આઉટપુટ જણાવો;
Module Program
    Sub Main(args As String())
        On Error GoTo Handler
        Dim a As Integer = 0
        Dim b As Integer = 156
        Dim ans As Integer
        ans = b / a
        Console.WriteLine("Press Enter to continue...")
        Exit Sub
Handler:
        Console.WriteLine("Exception Generated...")
        Resume Next
    End Sub
End Module
(a) Press Enter to continue...
(b) Exception Generated…
(c)
Press Enter to continue…
Exception Generated...
Press Enter to continue…
Exception Generated...
(d)
Exception Generated…
Press Enter to continue…
Exception Generated…
Press Enter to continue…
Answer:

Option (d)

39.
MDI Stands for _____
MDI મતલબ _____
(a) Multiple Design Interface
(b) Manipulated Document Interface
(c) Multiple Document Interface
(d) Menu Design Interface
Answer:

Option (c)

40.
In the following code 'Me' indicates to which control ?
Dim ChildForm As Form1 = New Form1()
ChildForm.MdiParent = Me
ChildForm.WindowState = FormWindowState.Normal
ChildForm.Show()
નીચે દર્શાવેલ પ્રોગામ માં 'Me' ક્યાં કંટ્રોલ ને દર્શાવે છે ?
Dim ChildForm As Form1 = New Form1()
ChildForm.MdiParent = Me
ChildForm.WindowState = FormWindowState.Normal
ChildForm.Show()
(a) Child Form
(b) MDI Form
(c) A and B both
A અને B બંને
(d) None of the above
ઉપરના માંથી એક પણ નહિ
Answer:

Option (b)

Showing 31 to 40 out of 41 Questions