Visual Programming Techniques BCA IV Sem Multiple Choice Questions
Visual Programming Techniques BCA IV Sem Multiple Choice Questions
1.
allows
application
2.
a.
b.
c.
d.
Environment
Graphical
Visual
None
IDE
Integrated
Menu
Real
Internet
Visual
IV
BCA you
stands
techniques
Multiple
questions
Sem time
Of
Driven
Basic
to
in…………
Development
These
develop
User
Dual
Desktop
Development
for…………..
is aInterface
Programming
choice
write no code.
tool that
(A) Private method
(B) Destructor
(C) Constructor
(D) Function
(A) Methods
(B) Attributes
(C) Classes
(D) Properties
(A) Variables
(B) Functions
(C) Procedures
(D) Properties
Question 5: Which modifier specifies that one or more declared
programming elements are accessible from within the assembly that
contains their declaration, not only by the component that declares
them?
(A) Default
(B) Friend
(C) ByRef
(D) ByVal
(C) Debugging
(D) Toolbox
(A) Events
(B) Properties
(C) Methods
(A) Show
(B) Font
(C) ForeColor
(D) BackColor
(A) Enabled
(B) Visible
(C) Show
(D) Hide
Question 14: It is a comprehensive, object-oriented collection of
reusable types that you can use to develop applications.
(A) Compiler
(B) Interpreter
(C) Language
(D) Translator
(C) Both
(D) None
(B) Constructor
(C) Both
(D) None
(A) Perl
(B) ASP
(C) COBOL
(D) C#
(A) BinaryWriter
(B) DecimalWriter
(C) HexaWriter
(D) OctalWriter
Question 23: The _____ model does not offer a model for source code
reuse.
(A) COM+
(B) COM
(C) DCOM
(D) .Net
(A) System.Int30
(B) System.Int32
(C) System.Int64
(D) System.Int16
Question 25: The member “clear” of the Array class that sets a range
of array elements to zero, false or null reference is a
_____________ method.
(A) Object
(B) Shared
(C) Class
(A) FromOADate
(B) TimeOfDay
(C) Today
(D) Now
(B) Integer
(C) Constant
(D) Character
(A) Inheritance
(B) Objects
(C) Namespaces
(D) Programs
(A) #Const
(B) #Region
(C) #ExternalSource
(D) #If…Then…#Else
Question 1: One or more option button controls can be selected from
________ choices.
A) multiple
(B) single
(C) dual
(D) parallel
(A) Status
(B) Tool
(C) Menu
(D) Progress
(C) No values
(A) An event
(B) A Method
(C) A Setting
(D) A Property
(A) data
(B) procedures
(C) event
(D) task
(A) Two_One
(B) 2One
(D) Two.One
(A) object
(B) event
(C) tool
(D) message
(A) actions
(B) classes
(C) data
(D) events
(A) Message
(B) Build In
(C) Val
(D) Mod
(A) location
(B) place
(D) name
(A) label
(C) frame
(A) Textbox
(D) Shape
(A) .frm
(B) .vbp
(C) .cls
(D) .txt
Question 17: In Visual basic more than one child _____ is allowed to
add in project.
(A) form
(B) window
(C) property
(D) codings
(A) me
(B) current
(C) form
(D) case
Question 19: Scroll bar is of __________ types in Visual basic for
usage.
(A) four
(B) two
(C) five
(D) six
Question 20: The width of any tool in visual basic can be changed at
___________ time.
(A) run
(B) debug
(C) design
(D) edit
Question 23: The ____________ is a tool used for both the Input and
output purpose.
(C) label
(A) int
(B) dim
(C) else
(D) declare
Question 25: Among the events in VB, the Load event is associated
with __________ .
(B) label
(D) form
(B) property
(D) coding
(A) GotFocus
(B) LostFocus
(C) Enabled
(D) Click
(A) project
(B) form
(C) class
(D) module
Question 29: Self Length Property is supported by __________
control in VB.
(A) label
(A) Public
(B) Private
(C) Protected
(D) Local
1. The default property for a text box control is
A. Text
B. Enable
C. Multiline
D. Password char
2. Which of the following accesss modifier specifies that one or more declared
programming elements are accessible from within the assembly that contains their
declaration, not only by the component that declares them?
A. ByRef
B. ByVal
C. Default
D. Friend
A. Destructor
B. private method
C. constructor
D. function
4. A GUI
D. Both a and b
A. debugging
B. application deployment
C. syntax checking
A. Properties
B. Attributes
C. Methods
D. Classes
7. Which of the following is not correct about the value types and reference types in
VB.NET?
8. Microsoft Windows uses a GUI environment. GUI (pronounced "gooey") stands for
_______
A. Functions
B. Properties
C. Procedures
D. Variables
10. Which is true about the name and text property of a control?
B. The text property changes to match any changes in the name property
C. The name property changes to match any changes in the text property
D. They are never the same unless the programmer makes it that way
1. Who developed Visual Basic?
1. Graphical
that
application
Interface
2.
for…………..
Development
Environment
3.
displays
and
your
4.
viewed
a.
Categorized
b.
Numeric
c.
Alphanumeric
d. Visual
IDE
Integrated
Which
Project
All
Properties
Alphabetic
None
Menu
Form
Numeric
Real
Internet
allows
modules
application
ofin
a) Symantec
stands
atime
the
b) Ashton-Tate
c) Microsoft
layout
Of
of
Driven
two
Basic
windows
list
window
you
in…………
Development
thes
and
These
above
making
User
Environment
of
ways
Dual
Desktop
window
can
and
to
window
is
alldevelop
a
be
forms
tool
up
d) Sybase
View Answer
Answer: c
Explanation: Visual Basic is a programming language and environment developed
by Microsoft. Visual Basic first version was published in 1991.
View Answer
Answer: b
Explanation: The class statement is used to define a class in visual basic. The class
statement begins with public class classname clause and ends with End
class clause. Within the class statement, you write the code to tell the form and the
object how to react to the user’s action.
3. Which of the following extension is used to represent the project file in Visual
Basic?
a) .vbp
b) .vb
c) .cls
d) .vvb
View Answer
Answer: a
Explanation: The .vbp file extension is used to represent the program file in Visual
Basic. .cls is used to save the Class module.
View Answer
Answer: c
Explanation: Visual basic can create variables “on the fly”. This means that if your
code contains undeclared variables, Visual basic creates the variable for you and
assigns object data type to it. An undeclared variable is a variable, which does not
appear in the declaration statement i.e. the Dim statement.
5. Which of the following applications can be developed using Visual Basic tool?
a) Graphical User Interface
b) Real-time
c) Character User Interface
d) All of the mentioned
View Answer
Answer: a
Explanation: Visual Basic tool provides an easy way to develop graphical user
interface (GUI) applications.
6. In Visual Basic, which of the following is used for coding single-alternative and
dual-alternative selection structures?
a) Switch-Case block
b) If…Then…Else statement
c) function overloading
d) Recursion
View Answer
Answer: b
Explanation: In Visual Basic If…Then…Else statement is used for coding single-
alternative and dual-alternative selection structures. The If…Then…Else statement
statements provide for a statement block where the condition may be true and
another if the condition is false.
7. What will be the output of the following Visual Basic code, If the intnumber
variable is 110?
If intnumber<=100 Then
Intnumber=intnumber*2;
Else
Intnumber=intnumber*3;
EndIf
a) 180
b) 330
c) 156
d) 270
View Answer
Answer: b
Explanation: Since the intnumber is 110, i.e. it is greater than 100, thus else part of
the code will be executed, i.e., the if part of the code will not be executed. Thus
intnumber=intnumber*3 will be executed, thus 110*3=330 will be stored in
intnumber.
8. In the Visual Basic application, which of the following are listed in a properties
window?
a) Items
b) Values
c) Attributes
d) Objects
View Answer
Answer: c
Explanation: Attributes also known as properties are listed in a Properties Window.
Attributes are keyword-like tags in which you can specify additional information
about entities defined in Visual Basic application. Attributes are saved as assembly’s
metadata.
a) -3043.88
b) -3034.88
c) -3408.48
d) -3304.88
View Answer
Answer: d
Explanation: The above expression calculates for a loan of Rs. 9000 for 3 years at
5% interest. Rate is 0.05, Nper is 3 and PV is 9000. The annual payment rounded off
to nearest is, -3304.88.
10. Which of the following is commonly used to perform an immediate action when
clicked in Visual Studio?
a) Button control
b) Close
c) End
d) Exit
View Answer
Answer: a
Explanation: Every application should give the user a way to exit the program. Most
Windows Application accomplishes this task using the Exit option. In visual basic a
button is used for sending an application. It is commonly used to perform immediate
action when clicked.
11. In the following Visual Basic code, what will be in msg, if str contains “visual
basic”?
a) Bye
b) Hi
c) Logical Error
d) Compiler Error
View Answer
Answer: b
Explanation: str contains “visual basic”. When we do str.toUpper, the string in str is
changed to “VISUAL BASIC”. Thus, the comparison satisfies, and the if statement is
executed, since the comparison returns a true value. Thus msg will contain “VB.Net”.
12. Which of the following displays the list of projects contained in the Visual Basic
current solution?
a) List Window
b) Project Window
c) Catalogue Window
d) Solution Explorer Window
View Answer
Answer: d
Explanation: The Solution Explorer Window provides you with an organized view of
your projects and their files as well as ready access to the commands that pertain to
them. A toolbar associated with this window offers commonly used commands for
the item you highlight in this list.
13. Which of the following method is used to sort an array in visual basic?
a) Array.Sort()
b) Array.sortAscending()
c) Array.arrayArrange()
d) Array.arrange()
View Answer
Answer: a
Explanation: You can use the Array.Sort method to sort a one-dimensional array’s
values in ascending order. To sort the values in descending order, you first use the
Array.Sort method to sort the values in ascending order, and then use the
Array.Reverse method to reverse the values. The syntax is as follows, where the
arrayName is the name of the array:
Array.Sort(arrayName)
14. Which of the following is the caption part for the following Visual Basic
command?
MessageBox.Show("Delete Visual
Basic?","VB.Net",MessageBoxButtons.YesNo,
MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2).
a) MessageBoxButtons.YesNo
b) MessageBoxIcon.Exclamation
c) “VB.Net”
d) “Delete Visual Basic?”
View Answer
Answer: c
Explanation: The syntax of the MessageBox.Show is-
MessageBox.Show (text, caption, buttons, icon, [defaultButton])
The caption is given as the second component in the syntax. In the above statement,
the second component is the “VB.Net”, thus it is the caption.
15. Which of the following instruction tells the computer to close the current form in
Visual Basic?
a) This.Close()
b) Me.Close()
c) Close.this()
d) Close()
View Answer
Answer: b
Explanation: The Me.Close() instruction tells the computer to close the current form.
If the current form is the only form, then this instruction closes the application. In the
instruction Me is a keyword that refers to the current form and Close is one of the
methods available in visual basic. A method is a predefined procedure that you can
invoke when needed.
View Answer
Answer: d
Explanation: You tell an object how to respond to an event, by writing event
procedures, which is a set of visual basic instructions that are processed only when
the event occurs.
17. What output will be returned if the following Visual Basic code is executed?
a) 11
b) 12
c) False
d) True
View Answer
Answer: b
Explanation: The IndexOf method returns the index of the first character of the
sequence, thus it returns 11 as the index of the first character “V” is 11. If it would
have been Contains Method, it would have returned True.
18. What will be the output of the following Visual Basic code?
a) 78,75,83,90
b) 90,75,83,78
c) 78, 83, 75,90
d) 75,78, 83,90
View Answer
Answer: b
Explanation: Array.Reverse method reverses the array list. It reverses the contents
of the array, placing the values in the following order: 90, 75, 83, and 78.
19. Which of the following is used to write a stream of characters in Visual Basic?
a) StreamReader object
b) StreamReader class
c) StreamWriter object
d) StreamWriter class
View Answer
Answer: c
Explanation: Programmers refer to a sequence of characters as a stream of
characters. In Visual Basic, you use a StreamWriter object to write a stream of
characters to a sequential access file. Before you create the StreamWriter object,
you first declare a variable to store the object in the computer’s internal memory. The
syntax is as follows:
{Dim | Private} streamWriterVariableName As IO.StreamWriter
The IO in the syntax stands for Input/Output.
20. What is the value of len in the following Visual Basic code?
21. Which of the following is the default name assigned to the label control in Visual
Basic?
a) Label1
b) DefaultLabel
c) Label0
d) NewLabel
View Answer
Answer: a
Explanation: Label1 is the default name applied to the label control. When a first
label is on the form it is named as Label1. When another label is brought in, it is
named as Label2 and it goes so on.
22. Which of the following toolbox is used to include an image on the Visual Basic
form?
a) Add Image box
b) Picture Box
c) Add Picture Box
d) Image box
View Answer
Answer: b
Explanation: We can include an image in the form using Picture box control, which is
instantiated using picture box tool. As we include the picture box, the properties of it
appears in the Properties Window.
23. In visual basic language what are the rules of a programming language called?
a) Grammar
b) Order
c) Syntax
d) Rules
View Answer
Answer: c
Explanation: The Code editor provides the code template to help you follow the rules
of the visual basic language. The rules of a programming language are called its
syntax. The first line in the code template is called the procedure header and the last
line the procedure footer.
24. What happens when both the minimize box and maximize box property are set to
false in Visual Basic?
a) Both are removed from the title bar
b) Both are disabled
c) This situation shows an exception
d) This situation shows an error
View Answer
Answer: a
Explanation: When both the minimize box property and maximize box property are
set to false, the buttons are not disabled that is they are not grayed out, instead they
are removed from the title bar.
25. In Visual Basic, which of the following keyword tells the computer to pass the
variable’s address rather than its contents?
a) ByAdd
b) ByPoint
c) ByRef
d) ByVal
View Answer
Answer: c
Explanation: You pass a variable by reference when you want the receiving
procedure to change the contents of the variable. To pass a variable by reference in
Visual Basic, you include the keyword ByRef before the name of its corresponding
parameter in the receiving procedure’s header. The ByRef keyword tells the
computer to pass the variable’s address rather than its contents.
26. Which of the following forces a literal constant to assume a data type other than
the one its form indicates?
a) Any literal
b) Keyword
c) Literal type constant
d) Literal type variable
View Answer
Answer: c
Explanation: decTex=0.5D statement shows that how you convert a numeric literal
constant of Double data type to decimal data type and then assign the result of a
decimal variable. The D that follows 0.5 in the statement is one of the literal type
characters in Visual basic. A literal type constant forces a literal constant to assume
a data type other than the one its form indicates. Here D forces the double number
0.5 to assume the decimal data type.
27. Which of the following is used to display a message box in Visual Basic?
a) MessageBox.Show
b) MessageBox.show
c) MessageBox
d) AlertBox.View
View Answer
Answer: a
Explanation: Application may need to communicate with the user during run time;
one means of doing this is through a message box. You display a message box
using the MessageBox.Show method. The message box contains text, one or more
buttons, and an icon.
28. In Visual Basic, which of the following method converts a string to a number?
a) Convert
b) Tryparse
c) Extern
d) Parse
View Answer
Answer: b
Explanation: The tryparse method converts a string to a number. However, unlike
the val function which always returns a double number, the tryparse method allows
the programmer to specify the number’s data type. For this reason most programmer
prefers to use the tryparse method. Every numeric data type in visual basic has
tryparse method that converts a string to that particular data type.
29. Which of the following is used to convert a number from one data type to another
in visual studio?
a) Literal constant
b) Object
c) Convert class
d) Parser
View Answer
Answer: c
Explanation: The convert class can be used in any language built in visual studio.
Thus they have an advantage of the conversion function; since the conversion
function can only be used in visual basic. To convert a number from one data type to
another, we generally use the convert class.
View Answer
Answer: c
Explanation: Intrinsic constant is one that is built into Visual Basic.
ControlChars.NewLine is inbuilt in Visual basic, that is the code for this function, that
is its control is already predefined. Thus it is an intrinsic constant.
31. The position of an item in a list box depends on which of the following property of
the value stored in the list box’s?
a) Unsorted property
b) Sorted property
c) Descending Property
d) Ascending property
View Answer
Answer: b
Explanation: The position of an item in a list box depends on the value stored in the
list box’s Sorted property. When the Sorted property is set to False (the default
value), the item is added at the end of the list. When the Sorted property is set to
True, the item is sorted along with the existing items and then placed in its proper
position in the list. Visual Basic sorts the list box items in dictionary order, which
means that numbers are sorted before letters, and a lowercase letter is sorted before
its uppercase equivalent.
32. Which of the following returns a value after performing its specific task in Visual
Basic?
a) Structure
b) Sub block
c) Sub procedure
d) Function Procedure
View Answer
Answer: d
Explanation: In addition to creating Sub procedures in Visual Basic, you also can
create
Function procedures. The difference between both types of procedures is that
a Function procedure returns a value after performing its assigned task, whereas a
Sub procedure does not return a value. Function procedures are referred to more
simply as functions.
33. Which of the following property is used to specify a combo box’s style in Visual
Basic?
a) Style
b) ComboBoxStyle
c) DropDownStyle
d) DropStyle
View Answer
Answer: c
Explanation: Three styles of combo boxes are available in Visual Basic. The style is
controlled by the combo box’s DropDownStyle property, which can be set to
Simple, DropDown (the default), or DropDownList. Each style of combo box contains
a text portion and a list portion.
34. What will be the output of the following Visual Basic code?
View Answer
Answer: d
Explanation: Array.Sort sorts the array in ascending order. In the question above it
sorts the contents of the array in ascending order, as follows: 75, 78, 83, and 90.
35. Which of the following section is used to make text appear around the image?
a) Wrapping style
b) Text style
c) Image properties
d) Align
View Answer
Answer: a
Explanation: Wrapping style makes the text appear around image. In Visual Basic
6.0, the WordWrap property determines if text wraps to multiple lines when it is too
long to fit in a label.
In Visual Basic 2008, the text in a Label control automatically wraps. The only way to
prevent wrapping is to make the height of the Label control equivalent to a single line
of text.