100% found this document useful (3 votes)
4K views16 pages

CS411 - Midterm Solved MCQs With References by Moaaz

Uploaded by

Waseem Sajjad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (3 votes)
4K views16 pages

CS411 - Midterm Solved MCQs With References by Moaaz

Uploaded by

Waseem Sajjad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

CS411 Visual Programming

Solved MCQS June 05,2014


For Midterm Exam

MC100401285 [email protected] [email protected] PSMD01

https://www.facebook.com/groups/VUsolvedPapers/
Question No: 1 ( Marks: 1 ) - Please choose one
Event-based programming is also known as:

Service-oriented architecture (SOA)


Event-driven Architecture (EDA) (Page 11)
Service-driven Architecture (SDA)
Event-based Architecture (EBA)

Question No: 2 (Marks: 1) - Please choose one


Polymorphism works on the basis that child class should have______feature/s of its parent class.

1. Only one
2. No
3. Few
4. All

Question No: 3 ( Marks: 1 ) - Please choose one


The base class will have the _____ functionality of all derived classes

1. Common
2. Specialized
3. Unique
4. Different

Question No: 4 ( Marks: 1 ) - Please choose one


Clean room design is also called__________

1. Clear Room Design


2. Wall Technique Design (Page 13)
3. Chinese Wall Technique
4. French Wall Technique

https://www.facebook.com/groups/VUsolvedPapers/
1
Question No: 5 ( Marks: 1 ) - Please choose one
Indexers are similar to properties, but are accessed via a/an____________rather than a property name.

1. Index Argument Click here 4 detail


2. Reference
3. Pointer
4. Integer Argument

Question No: 6 ( Marks: 1 ) - Please choose one


Types not defined in any namespace are said reside in the___________namespace.

1. Local
2. Static
3. Virtual
4. Global Click here 4 detail

Question No: 7 ( Marks: 1 ) - Please choose one


A compiled C# file is called

1. Complied File
2. Source File
3. Assembly File (Page 41)
4. EXE File

Question No: 8 ( Marks: 1 ) - Please choose one


Cool stands for______________.

1. Class Oriented Object Language


2. Consumer Oriented Object Language
3. C-like Object Oriented Language
4. C++-like Object Oriented Language (Page 13)

Question No: 9 ( Marks: 1 ) - Please choose one


The initial name for C# was______________.

1. COAL
2. COOP
3. COAP
4. COOL (Page 13)

https://www.facebook.com/groups/VUsolvedPapers/

2
Question No: 10 ( Marks: 1 ) - Please choose one
The Main method returns a non-zero value which indicates the_____________.

1. Source of Program
2. Error in Program Click here 4 more detail
3. Termination of Program
4. Exception in Program

Question No: 11 ( Marks: 1 ) - Please choose one


Attributes add ____________to year program.

1. Clearance
2. Errors
3. Meta Data (Page 40)
4. Ambiguity

Question No: 12 ( Marks: 1 ) - Please choose one


Wait for a single event is ____________operation.

1. Waiting
2. Waste
3. Idle
4. Blocking (Page 8)

Question No: 13 ( Marks: 1 ) - Please choose one


To use kbhit() command, you need to include which header file in your program?

1. fstream.h
2. stdio.h
3. iostream.h
4. conio.h Click here 4 more detail

Question No: 14 ( Marks: 1 ) - Please choose one


Which of the following is built from request-response?

1. Event-processing Architecture (EDA)


2. Service-driven Architecture (SDA)
3. Service-oriented Architecture (SOA) (Page 11)
4. Event-bas Architecture (EBA)

https://www.facebook.com/groups/VUsolvedPapers/

3
Question No: 15 ( Marks: 1 ) - Please choose one
__________let any classes behave like an array.

1. Properties
2. Fields
3. Indexers (Page 29)
4. Finalizers

Question No: 16 ( Marks: 1 ) - Please choose one


All the members of interfaces are implicitly__________.

1. Private
2. Static
3. Public (Page 34)
4. Abstract

Question No: 17 ( Marks: 1 ) - Please choose one


___________methods do not have names.

1. Attribute
2. Anonymous (Page 46)
3. None of given
4. Non-Anonymous

Question No: 18 ( Marks: 1 ) - Please choose one


Derived Event is:

Introduced into an event processing system by an event consumer.


Generated as a result of event that takes place inside an event processing system. (Page 11)
Introduced into an event processing system by an event producer.
A set of associated events.

Question No: 19 ( Marks: 1 ) - Please choose one


Which of the following is an occurrence within a particular system or domain?

Object
Event (Page 7)
Result
Message

https://www.facebook.com/groups/VUsolvedPapers/

4
Question No: 20 ( Marks: 1 ) - Please choose one
_____________ is an entity that receives events from the system.

Event Producer
Event Consumer (Page 11)
Event Channel
Event Generator

Question No: 21 ( Marks: 1 ) - Please choose one


Writing higher-level functions that call upon lower-level functions _________ a program.

Decode
Harder
Refactor
Simplify

Question No: 22 ( Marks: 1 ) - Please choose one


Which statement is True?

A "catch" block always executes whether or not an exception is thrown and whether or not the "try" block runs
to completion.
A "finally" block executes only, when an exception is thrown and when the "try" block runs to completion.
A "finally" block may or may not executes whether or not an exception is thrown and whether or not the "try"
block runs to completion.
A "finally" block always executes whether or not an exception is thrown and whether or not the "try"
block runs to completion. Click here 4 detail

Question No: 23 ( Marks: 1 ) - Please choose one


Attributes of a program can be queried at run time through ____________.

Reflection (Page 41, for more detail)


Value
Reference
Extension

Question No: 24 ( Marks: 1 ) - Please choose one


During the program execution, program can be stopped with the help of ____________.

Attributes
Compiler
Exception Handling
Breakpoints (Page 47)

5
Question No: 25 ( Marks: 1 ) - Please choose one
The ______, _________ and __________of applications that use events, either directly or indirectly is called
event-based programming.

Model, Code, Operation


Analyze, Design, Operation
Code, Operation, Maintain
Design, Coding, Operation (Page 8)

Question No: 26 ( Marks: 1 ) - Please choose one


Clean room design is useful as a defense against _____________.

Copyright
Trade secret infringement
Copyright and trade secret infringement (Page 13)
None of the given options

Question No: 27 ( Marks: 1 ) - Please choose one


The result of Exception can bring __________ in the program.

Reliability
Stability
Inconsistency (Page 40)
Consistency

Question No: 28 ( Marks: 1 ) - Please choose one


___________ method reads the whole document in memory.

XmlDocument (Page 48)


XmlLine
XPath
XmlReader

Question No: 29 ( Marks: 1 ) - Please choose one


The __________ in the namespace indicate a hierarchy of nested namespaces.

Arrows
Dots
Semicolon
Brackets (Page 22)

https://www.facebook.com/groups/VUsolvedPapers/

6
Question No: 30 ( Marks: 1 ) - Please choose one
If we run the program from within Visual Studio, the console window disappears quickly so we can use
________________ to keep screen from going away.

Console.ReadLine() (Page 15)


Console.WriteLine()
Console.Title
Console.Clear

Question No: 31 ( Marks: 1 ) - Please choose one


Which of the following is an entity that introduces event into the system?

Event Channel
Event Stream
Event Consumer
Event Producer (Page 11)

Question No: 32 ( Marks: 1 ) - Please choose one


At the time an event is fired, the _____________ methods will be invoked.

Registered Click here 4 detail


Public
Static
Unregistered

Question No: 33 ( Marks: 1 ) - Please choose one


The easiest way to declare an event is to put the event keyword in front of a ________ member.

Interface
Delegate Click here 4 detail
Class
Struct

Question No: 34 ( Marks: 1 ) - Please choose one


Which of the following does NOT include in event processing operations?

Deleting Events
Reading Events
Terminating Events (Page 8)
Transforming Events

https://www.facebook.com/groups/VUsolvedPapers/

7
Question No: 35 ( Marks: 1 ) - Please choose one
An event is a list of___________

constants
variable
pointers
delgates

Question No: 36 ( Marks: 1 ) - Please choose one


C# is a _________ and .NET is a _________.

Platform, Language
Package, Language
Language, Package
Language platform (Page 13)

Question No: 37 ( Marks: 1 ) - Please choose one


Anonymous methods _________________ the code size.

Double
Expand
Reduce (Page 46)
Extend

Question No: 38 ( Marks: 1 ) - Please choose one


g++ is a command of ____________.

Dev C++
Unix based system
Windows based system
None of the given options

Question No: 39 ( Marks: 1 ) - Please choose one


A class can inherit from ___________class/classes.

Two
Single Click here 4 detail
Three
Multiple

https://www.facebook.com/groups/VUsolvedPapers/

8
Question No: 40 ( Marks: 1 ) - Please choose one
Which of the following events may or may not relate to an actual occurrence?

Probabilistic Events (Page 7)


Actual Events
Real Events
Expected Events

Question No: 41 ( Marks: 1 ) - Please choose one


Which of the following statements is TRUE about raw event?

It is introduced into an event processing system by an event producer. (Page 11)


It is generated as a result of event processing.
It is introduced into an event processing system by an event consumer.
It is a subscription mechanism for events.

Question No: 42 ( Marks: 1 ) - Please choose one


A method performs an action in a series of statements, called a ______________.

Code Block
Method Block
Routine Block
Statement Block Click here for detail

Question No: 43 ( Marks: 1 ) - Please choose one


Graphical user interfaces and the event-driven model are not applied on which of the following?

Web Applications
Console Applications
Mobile applications
Desktop Applications

Question No: 44 ( Marks: 1 ) - Please choose one


The System.Console is a ___________ which enables us to do Console Input and Output.

Structure
Class (Page 14)
Namespace
Library

https://www.facebook.com/groups/VUsolvedPapers/

9
Question No: 45 ( Marks: 1 ) - Please choose one
Events are based on the principle of ____________.

Request
Response
Coupling
Decoupling (Page 10)

Question No: 46 ( Marks: 1 ) - Please choose one


In event-driven architecture (EDA), _______________ sends event to _________________.

Event Consumer, Event Producer


Event Producer, Event Consumer (Page 10)
Event Handler, Event Producer
Event Generator, Event Producer

Question No: 47 ( Marks: 1 ) - Please choose one


XML is a stricter version of ____________.

Java
CSS
HTML (Page 47)
C#

Question No: 48 ( Marks: 1 ) - Please choose one


Extension methods __________ access the private data members of the class in which they are extended.

May
Cannot click here 4 more detail
May not
Can

Question No: 49 ( Marks: 1 ) - Please choose one


BAML is compressed representation of _________.

CAML:NS
XAML (Page 71)
XAML:NS
CAML

https://www.facebook.com/groups/VUsolvedPapers/

10
Question No: 50 ( Marks: 1 ) - Please choose one
In context of XAML child element rules, if the child is plain text and a type converter exists to transform the
child into the parent type (and no properties are set on the parent element), treat the child as the input to the
type converter and use the output as the __________.

Parent object instance (Page 68)


Interface object instance
none
Child object instance

Question No: 51 ( Marks: 1 ) - Please choose one


IsNumeric(string s) is a function of ______________ class.

Math class
Program class
String class
MyUtills class (Page 53)

Question No: 52 ( Marks: 1 ) - Please choose one


XAML specification defines rules that map ".NET" namespaces, types, properties, and events into _________.
I) XML namespaces II) XML elements III) XML Attributes

(I) Only
(II) Only
(I), (II) and (III) only (Page 63)
(III) Only

Question No: 53 ( Marks: 1 ) - Please choose one


Visual Studio has a snippet called __________ that automatically expands into a definition of a dependency
property, which makes defining one much faster than doing all the typing yourself!

Propdp (Page 77)


Property extension
Dpprop
Dependency property

Question No: 54 ( Marks: 1 ) - Please choose one


Suppose we want to restrict the user to don’t decrease the height of a WPF element from a specific amount then
which property will be used?

MinHeight (Page 83)


none
HeightMinimum
MinimumHeight
11
Question No: 55 ( Marks: 1 ) - Please choose one
WPF element in "DockPanel" has property "dock". There is/are __________ possible value(s) of "dock"
property.

two
three
four (Page 93)
one

Question No: 56 ( Marks: 1 ) - Please choose one


WPF4 was released in

2012
2010 Click here for detail
2005
2003

Question No: 57 ( Marks: 1 ) - Please choose one


_________ allows to keep the user interface description and implementation separate.

GDI
WPF (Page 61)
Avalon
Altia

Question No: 58 ( Marks: 1 ) - Please choose one


When the data is passed from one place to another in chunks, this data is called ____________.

Bits
Line
Byte
Stream

Question No: 59 ( Marks: 1 ) - Please choose one


We want the width of button should cover the whole width of StackPanel in WPF then what should be value of
HorizontalAlignment property of button?

Parent
Whole
Fill
Stretch (Page 97)

12
Question No: 60 ( Marks: 1 ) - Please choose one
Which of the following is/are not derived from “Control” class?

ListBox
StatusBar
None of the given (Page 73)

Question No: 61 ( Marks: 1 ) - Please choose one


If we want to move an object in the 2-D x-y coordinate system then which transform class will be used?

Translate Transform (Page 89)


Skew Transform
Skew Transform
Rotate Transform

Question No: 62 ( Marks: 1 ) - Please choose one


Dependency properties are represented by _______________ .

System.Windows.DependencyProperty (Page 77)


System.Windows.Dependency.Property
System.Windows.Dependency
System.Windows.Property.Dependency

Question No: 63 ( Marks: 1 ) - Please choose one


System.Windows.Controls.Button b = new System.Windows.Controls.Button(); b.Content = "OK"; For the
above code (written in C#) the corresponding XAML code will be:

<Button xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation Content="OK"/> (Page 63)


<Button xmlns= “OK” Content="http://schemas.microsoft.com/winfx/2006/xaml/presentation "/>
<Button xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation Event="OK"/>
<Button xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" Call="OK"/>

Question No: 64 ( Marks: 1 ) - Please choose one


____________ is a base class similar to UIElement but for document-related pieces of content that don’t have
rendering behavior on their own.

ContentElement (Page 73)


VisualElement
SystemElement
XAMLElement

https://www.facebook.com/groups/VUsolvedPapers/

13
Question No: 65 ( Marks: 1 ) - Please choose one
In context of XAML child element rules, if the parent supports a content property and the type of the child is
compatible with that property, treat the child as its __________.

Super class
Sub class
Value (Page 68)
Interface

Question No: 66 ( Marks: 1 ) - Please choose one


Mapping to the WPF namespaces is ______________ in-side the WPF assemblies.

Specified at compile time


Hard-coded (Page 63)
None of the given
Dynamically specified

Question No: 67 ( Marks: 1 ) - Please choose one


The _______________ user interfaces, enabled by WPF, is getting a lot of attention.

Loutish
Polished (Page 61)
Coarse
Distracted

Question No: 68 ( Marks: 1 ) - Please choose one


The ___________ method is used to read the whole file at once.

ReadAllText(“test.txt”); Click here for detail


ReadAll();
Read(“test.txt”);
ReadLine();

Question No: 69 ( Marks: 1 ) - Please choose one


With the help of WPF, an ugly looking application can be _______ by the designers.

Rearranged
Re-created
Re-themed(Page 61)
Rejected

https://www.facebook.com/groups/VUsolvedPapers/

14
Question No: 70 ( Marks: 1 ) - Please choose one
Additional XML namespaces (on the root or on children) must be ______ to be used on any identifiers from
that namespace.

Given a common prefix


Qualified with “Pre” keyword
Given a distinct prefix (Page 63)
Qualified with “Ext” keyword

Question No: 71 ( Marks: 1 ) - Please choose one


Extension methods can only be defined in ______________ class.

Dynamic class
Normal class
String class
Static class Click here for detail

Question No: 72 ( Marks: 1 ) - Please choose one


If we want to rotate an object clockwise about a specified point in a 2-D x-y coordinate system then which
transform class will be used?

None of given (Page 87)


Translate Transform
Skew Transform
Scale Transform

Question No: 73 ( Marks: 1 ) - Please choose one


The code given below is equivalent to _________ . <SolidColorBrush>White</SolidColorBrush>

<WhiteBrush >MyWhiteBrush </ WhiteBrush>


None of the given options
<SolidColorBrush Color="White"/> (Page 65)
<Brush Style= “SolidWhite” >

Question No: 74 ( Marks: 1 ) - Please choose one


“FrameworkElement” is the base class that adds support for _______________.

Some common mechanisms for Windows-based controls


Data binding
Styles
All of the given options (Page 73)

15
Question No: 75 ( Marks: 1 ) - Please choose one
All elements of WPF have following property/properties.

Width
None of given options
Height and Width
Height

Question No: 76 ( Marks: 1 ) - Please choose one


If we exclude the mechanism of calling the objects through name then:

Code will not compile


Code will be difficult to debug
Code will have errors
Code will become design dependent

Question No: 77 ( Marks: 1 ) - Please choose one


If we want to place a component at top in "dockpanel" then which one is correct syntax?

PanelDock="Top"
Dock="Top"
DockPanel.Dock="Top" (Page 93)
DockPanel="Top"

https://www.facebook.com/groups/VUsolvedPapers/

16

You might also like