lOMoARcPSD|19190795
MCQs Visual Programming C#
Skill development (Abdul Wali Khan University Mardan)
Scan to open on Studocu
Studocu is not sponsored or endorsed by any college or university
Downloaded by Muhammad Salman Ullah (salmanullah@gmail.com)
lOMoARcPSD|19190795
100 MCQs of Visual Programming
1. Which of the following is not a component of IDE…
a) tool box
b) start menu
c) designer windows
d) solution explorer
Answer
B
2: ——- is an example of visual objects…
a) control objects
b) ADO.NET
c) ASP.NET
d) all of the above
Answer -
B
3: Which of the following is used to change the color of the form…
a) can’t change
b) properties windows
c) source code
d) b and c both
Answer -
D
4: Which of the following is used in GUI…
a) should be easy for a user to manipulate
b) uses buttons, menus, and icons
c) Both a and b
d) All of the above
Answer -
C
5:Which function call for the exit sub procedure , function procedure…
a) exit for
Downloaded by Muhammad Salman Ullah (salmanullah@gmail.com)
lOMoARcPSD|19190795
b) break
c) exit do
d) exit ()
Answer -
D
6:Which of the following is used to hide the content in textbar…
a) caption
b) hiden
c) password char
d) name
Answer -
C
7: Which of the following is used to represent the items in a hierarchical
manner…
a) progress bar
b) tree view
c) grid view
d) none of these
Answer -
B
8: Which of the following method is used to remove a dialog box in from view…
a) display
b) hide
c) enable
d) disable
Answer -
B
9: Which of the following box provides a set of choices to the user…
a) Text
b) Combo
Downloaded by Muhammad Salman Ullah (salmanullah@gmail.com)
lOMoARcPSD|19190795
c) Command
d) list
Answer
D
10:Which of the following property is common for many tools…
a) name
b) window status
c) place
d) location
Answer -
A
11:Which of the following is true about disabled menu item does not appear in the
…
a) title bar
b) status bar
c) standard bar
d) menu bar
Answer -
D
12: Which of the following arrays can be declared when the user may not know
the exact size of the array at design time…
a) dynamic array
b) dimensional array
c) two-dimensional array
d) none of these
Answer -
A
13: Which of the following appears at the top of the screen…
a) menu
b) title
c) debug
d) tool
Downloaded by Muhammad Salman Ullah (salmanullah@gmail.com)
lOMoARcPSD|19190795
Answer -
B
14: Which option is true when the user clicks a button …….. is opened…
a) a method
b) an event
c) a property
d) a setting
Answer -
B
15: Which of the following example is true about visual programming…
a) controls object
b) ADO.NET
c) ASP.NET
d) all of these
Answer -
D
16. CLR is the .NET equivalent of _________.
A. Java Virtual Machine
B. Common Language Runtime
C. Common Type System
D. Common Language Specification
Answer -
A
17. In C#, a subroutine is called a ________.
A. Function
B. Metadata
C. Method
D. Managed code
Answer
C
Downloaded by Muhammad Salman Ullah (salmanullah@gmail.com)
lOMoARcPSD|19190795
18. All C# applications begin execution by calling the _____ method.
A. Class()
B. Main()
C. Submain()
D. Namespace
Answer
19. _________ are reserved, and cannot be used as identifiers.
A. Keywords
B. literal
C. variables
D. Identifiers
Answer
20. A _____ is any valid C# variable ending with a colon.
A. goto
B. Label
C. Logical
D. Bitwise
Answer
21. C# has _______ operator, useful for making two way decisions.
Downloaded by Muhammad Salman Ullah (salmanullah@gmail.com)
lOMoARcPSD|19190795
A. Looping
B. Functional
C. Exponential
D. Conditional
Answer
22. C# doesnot support:
A. abstraction
B. polymorphism
C. multiple inheritance
D. inheritance
Answer
23. Different ways a method can be overloaded in C#.NET
A. Different parameter data types
B. Different order of parameters
C. Different number of parameters
D. All of above
Answer
24. In the body of a method, C# uses the variable named_____to refer to the
current object whose method is being invoked
A. call
B. this
Downloaded by Muhammad Salman Ullah (salmanullah@gmail.com)
lOMoARcPSD|19190795
C. do
D. that
Answer
25.String mystring; Creates a(n)
A. class
B. Constructor
C. Object
D. a and b
Answer
26. An Event is
A. The result of a users action
B. result of a party
C. code to force users action
Answer
27: Which of the following box given a set of choices to the user
a) Command
b) list
c) Text
d) combo
Answer -
B
Downloaded by Muhammad Salman Ullah (salmanullah@gmail.com)
lOMoARcPSD|19190795
28: Which statements are true, IDE is…
a) Integrated development environment
b) Integrated dual environment
c) Internet development environment
d) Integrated desktop environment
Answer
A
29: Which of the following is true that access specifier allows a class to expose
its member variables and member functions to other functions and objects?
a) private
b) public
c) internal
d) protected
Answer
B
30. ……………. event occurs when a key is pressed while the form has the focus.
A) Keydown
B) Keypress
C) Keyup
D) KeyEnter
Answer
B
31 In C#.net ……………….. keyword is used to refer to the current object.
A) Current
B) Me
C) This
D) Form
Answer
C
Downloaded by Muhammad Salman Ullah (salmanullah@gmail.com)
lOMoARcPSD|19190795
32. Form’s ………………. property is used to specify the initial position on the screen.
A) InitialPosition
B) StartPosition
C) StartScreen
D) InitialScreen
Answer
B
33. ………….. class is built into the .Net Framework to display messages and accept
input from the user.
A) Msgbox
B) MessageBox
C) InputBox
D) DisplayBox
Answer
B
34: We can limit the amount of text entered into TextBox control by setting
……………… property to a specific number of characters.
A) MaxLength
B) TotalLength
C) TextAmount
D) TextLimit
Answer
A
35: TextBox controls also can be used to accept password if the …………….. property
is used to mask characters.
A) PasswordChar
B) PasswordCharacter
C) MaskChar
D) PasswordControl
Answer
Downloaded by Muhammad Salman Ullah (salmanullah@gmail.com)
lOMoARcPSD|19190795
36: In order for the scroll bars to actually appear, the text box’s …………….. property
must be True.
A) MultiLine
B) MultiText
C) Scrolling
D) MultiVisible
Answer
A
37: The Windows Forms __________ is a component that raises an event at regular
intervals.
A.Splitter
B.delegate
C.Timer
D.None of these
Answer
C.
38: The __________ control provides a shortcut menu that you associate with a
control.
A.ContextMenuStrip
B.ToolStrip
C.ToolStripTextBox
Answer
A.
39 : Choose which one is converts a type to a string…
a) toSbyte
b) tosingle
c) toString.
d) toInt64
Answer
C
Downloaded by Muhammad Salman Ullah (salmanullah@gmail.com)
lOMoARcPSD|19190795
40: Which of the following is the data members of a class by default …
a) private, public
b) protected, public
c) public
d) private
Answer
D
41: Which of the following is used to define reference variable…
a) $
b) #
c) ref
d) &
Answer
42: Which of the following method has the same name as its class name…
a) class
b) delete
c) constructor
d) none of these
Answer
43: ………. is used for the changed the colour of the form…
a) can’t change
b) property window
c) source code
d) both b & c
Answer
Downloaded by Muhammad Salman Ullah (salmanullah@gmail.com)
lOMoARcPSD|19190795
44: Which of the following is not true about font property…
a) font save
b) font bold
c) font name
d) all of these
Answer
45: Project is run through a shortcut key…
a) F5
b) F8
c) F6
d) F9
Answer
46: Code that targets the Common Language Runtime is known as
A.Unmanaged
B.Distributed
C.Legacy
D. Managed Code
Answer
Downloaded by Muhammad Salman Ullah (salmanullah@gmail.com)
lOMoARcPSD|19190795
47: Which of the following constitutes the .NET Framework?
A. ASP.NET Applications
B. CLR
C. Framework Class Library
D. WinForm Applications
Answer
B
48: Which of the following is the root of the .NET type hierarchy?
A. System.Object
B. System.Type
C. System.Base
D. System.Parent
Answer
A
49: How many values is a function capable of returning?
A.1
B.0
C. Number of arguments does it use.
D. Any number of values.
Answer
A
Downloaded by Muhammad Salman Ullah (salmanullah@gmail.com)
lOMoARcPSD|19190795
50: Which of the following statements is correct about constructors in C#.NET?
a) A constructor cannot be declared as private.
b) A constructor cannot be overloaded.
c) A constructor can be a static constructor.
d) A constructor cannot access static data.
Answer
C
51: _______ is used for finding out about objects, properties and methods.
a. Object browser
b. Form layout window
c. Code editor window
d. None of the above
Answer
A
52: The default property for a text box control is _____
a. Text
b. Password char
c. Multiline
d. Enable
Answer
A
Downloaded by Muhammad Salman Ullah (salmanullah@gmail.com)
lOMoARcPSD|19190795
53: The ______ is a tool used for both the Input and output purpose.
a. command button
b. text box
c. label
d. combo box
Answer
B
54: A variable which is declared inside a method is called a________variable.
A. Local
B. Private
C. Static.
D. Serial
Answer
A
55:_______ is used to give the control a meaningful name in a control’s list of
properties?
(A). Text
(B). ContextMenu
(C). Name
(D). ControlName
Answer
C
Downloaded by Muhammad Salman Ullah (salmanullah@gmail.com)
lOMoARcPSD|19190795
56: ……………… is a valid name for a variable?
A. T4 Marks
B. 4 Marks
C. T4_Marks
D. T4.Marks
Answer
57: What is the size of a Decimal?
A.4 byte
B.8 byte
C.16 byte
D.32 byte
Answer
C
58: Which of the following is an 8-byte Integer?
A. Char
B. Long
C. Short
D. Byte
Answer
59: Which of the following is NOT an Integer?
A. Char
B. Byte
Downloaded by Muhammad Salman Ullah (salmanullah@gmail.com)
lOMoARcPSD|19190795
C .Integer
D. Long
Answer
60: Which of the following is the correct default value of a Boolean type?
A. 0
B. 1
C. TRUE
D. FALSE
Answer
D
61: Which of the following is the correct size of a Decimal datatype?
A.8 Bytes
B.4 Bytes
C.10 Bytes
D.16 Bytes
Answer
D
62: Which of the following are not a Logical operators in C#.NET?
A. &&
B. ||
C. !
D. Xor
Answer
D
Downloaded by Muhammad Salman Ullah (salmanullah@gmail.com)
lOMoARcPSD|19190795
63: A GUI:
A) uses buttons, menus, and icons.
B) should be easy for a user to manipulate.
C) stands for Graphic Use Interaction.
D) Both a and b.
Answer
64: Visual Studio .NET provides which feature:
A) debugging.
B) application deployment.
C) syntax checking.
D) All of the above.
Answer
65: Which type of project can a developer choose in the New Project dialog box?
A) Visual Basic Projects
B) Visual C# Projects
C) Visual C++ Projects
D) All of the above.
Answer
D
66: Which is not a main component of the Visual Studio IDE
A) Solution Explorer
B) Tool Box
C) Start Menu
D) Designer Window
Answer
Downloaded by Muhammad Salman Ullah (salmanullah@gmail.com)
lOMoARcPSD|19190795
67: Which are the standard prefixes for the Button and Combo box controls
respectively?
A) btn and chb
B.) btn and cbo
C) bto and chb
D) bto and cbo
Answer
68: Which are the standard prefixes for the text box and label controls
respectively?
A) tex and lbl
B) tex and lab
C) txb and lbl
D) txb and lab
Answer
69: Which task is accomplished in the Code editor?
A) Adding forms to the project
B) Adding controls to the form
C) Adding event procedures to the form
D) Both a and b.
Answer
70: An object is composed of:
A) properties.
B) methods.
C) events.
D) All of the above.
Answer
Downloaded by Muhammad Salman Ullah (salmanullah@gmail.com)
lOMoARcPSD|19190795
71: Which is not a property of the Common control class?
A) Show
B) BackColor
C) Font
D) ForeColor
Answer
72: Which property determines whether a control is displayed to the user?
A) Hide
B) Visible
C) Enabled
D) Cursor
Answer
73: The CancelButton property belongs to which object?
A) Button
B) Form
C) Label
D) Timer
Answer
74: The Tick event is found only in which object?
A) Form
B) Button
C) Label
D) Timer
Answer
Downloaded by Muhammad Salman Ullah (salmanullah@gmail.com)
lOMoARcPSD|19190795
75: The Date data type does not hold which type of information.
A) Seconds
B) Hours
C) Days
D) Quarters
Answer
76: Which TextBox property should always be changed first?
A) BorderStyle
B) Font
C) Name
D) Text
Answer
77: Which method of a ListBox will remove all the items at a time?
A) Items.RemoveAt
B) Item.RemoveAt
C) Items.ClearAt
D) Items.Clear
Answer
Downloaded by Muhammad Salman Ullah (salmanullah@gmail.com)
lOMoARcPSD|19190795
78: Which two controls combined to form the ComboBox control?
A) ListBox and TextBox
B) ListBox and InputBox
C) ListBox and MsgBox
D) Label and TextBox
Answer
79:Which of the following is used to hide the content in textbar…
a) caption
b) hiden
c) password char
d) name
Answer -
C
80: Which of the following is used to represent the items in a hierarchical
manner…
a) progress bar
b) tree view
c) grid view
d) none of these
Answer -
B
Downloaded by Muhammad Salman Ullah (salmanullah@gmail.com)