CS410 Visual Programming Online Solved Quizzes/MCQ's File No 1



An accelerator, not always needs to correspond to a menu command.
Select correct option:

TRUE
FALSE




The _______ function retrieves a handle to one of the stock pens, brushes, fonts, or palettes
Select correct option:

GetStockGDI
GetStockDC
GetStockObject
None of the given options




Device-independed value represents
Select correct option:

Virtual key code
Key code
Read only code
Mix code

A _________ is commonly used to handle background tasks
Select correct option:
Worker thread
User Interface thread
Parent thread
Process thread


The system paints the background for a window or gives the window, the opportunity to do so by sending it a _______ message
Select correct option:
WM_FILLBKGND
WM_ERASEBKGND
WM_SYSCOMMAND
WM_OVERLAPPED


Who generate a unique handle for each menu?
Select correct option:

System
User
Dialog box
Menu Items




By default all resources are Discardable.
Select correct option:

True
False


A message box is a ________ and the system creates it by using the same internal functions that "DialogBox" uses
Select correct option:

Modeless dialog box
Dialog box template
Modal dialog box
None of the given options




The DialogProc function is used to ________
Select correct option:

Create a Dialog
Destroy a Dialog
Hide a Dialog
process messages sent to a modal or modeless dialog box




If the load menu function fails so what will be the return value.
Select correct option:

0
False
Null
1




The _________ function draws a rectangle
Select correct option:

SetRectCoords(...)
ShowRectangle(...)
DrawRectangle(...)
Rectangle(...)




Which of the following is compulsory about a keyboard accelerator?
Select correct option:

Identifier of Keyboard accelerator must start with "ID_".
Accelerator and corresponding menu item must have identical identifiers.
You must not write DISCARDABLE in the resource script of accelerator.
All of the given options


Whenever a window is resized, system sends "WM_SIZING" message to the application that owns the window
Select correct option:
TRUE
FALSE


Regarding Win32, an application cannot subclass a Window or Class that belongs to another process
Select correct option:
TRUE
FALSE


Ptr -> age is equivalent to _______________
Select correct option:
*ptr.age
ptr.age
(ptr).age
(*ptr).age


If a window owns child Windows, and we destroy owner Window then _____________.
Select correct option:
Only owner window will be destroyed
Only its owned window will be destroyed
Both owner and owned Windows will be destroyed
The application will be crashed


__________ handles user inputs and responds to user events independently.
Select correct option:
User-Interface Thread
Worker Thread
Kernel Thread
None of given options


___________ provides the functionality to create and manage screen windows and most basic controls
Select correct option:
GDI
Common Dialog Box
Common Control Library
User Interface


_______ acts as a buffer between applications and output devices.
Select correct option:
GDI
Kernel32
OS
CPU


The _____ function writes a character string at the specified location, using the currently selected font, background color, and text color
Select correct option:
printf(...)
PrintText(...)
TextOut(...)
cout





Name of Two dimensional array is the address of _________
Select correct option:
First Column
First Row
Last Row
Last Column

A thread _________
Select correct option:
is a path of execution through a program
is smallest unit of execution that Win32 schedules
consists of a stack
All of given options


*(a+i) can also be written as ________________
Select correct option:
a [i]
a[i+1]
*a
*a+1


Name of Two dimensional array is the address of _________
Select correct option:
First Column
First Row
Last Row
Last Column

A thread _________
Select correct option:
is a path of execution through a program
is smallest unit of execution that Win32 schedules
consists of a stack
All of given options

GDI presents _________
Select correct option:
Device-independent view
Device-dependent view
Monitor-dependent view
None of given


What will be the entry point to a Windows program?
Select correct option:
WinMain
Main
Java.main
System.main


GDI is implemented through ____________________
Select correct option:
GDI.dll
Win32.dll
GDI32.dll
Kernel




We can create a window using ______________
Select correct option:
RegisterClass ( )
WNDClass
CreateWindow ( )
DestroyWinndow( )

A thread _________
Select correct option:
is a path of execution through a program
is smallest unit of execution that Win32 schedules
consists of a stack
All of given options

A thread can not share all of the its resources
Select correct option:
TRUE
FALSE



If a window owns child Windows, and we destroy owner Window then _____________.
Select correct option:
Only owner window will be destroyed
Only its owned window will be destroyed
Both owner and owned Windows will be destroyed
The application will be crashed

A Window that has a parent is called a ____ Window
Select correct option:
Parent
Main
Child
Owner Window



_________ is unique identifier of the registered window class return by Registeredclass ()
Select correct option:
Handle
Cursor
Object
ATOM

______________ tell the operating system about the characteristics and physical layout of its windows.
Select correct option:
Register Class
Object Class
Window Class
Common Class

Result of _________________ of two bits is TRUE (1) if only if both are TRUE (1)
Select correct option:
OR (I)
XOR
AND (&)
NOR

Union Person { char name[30]; //30 bytes int age; float height; }; Union Person abc, *ptr; Ptr = &abc; ptr = ptr +1; How many bytes will skip after executing ptr = ptr +1.
Select correct option:
38 bytes will skip after executing ptr = ptr +1.
30 bytes will skip after executing ptr = ptr +1.
31 bytes will skip after executing ptr = ptr +1.
32 bytes will skip after executing ptr = ptr +1.

There cannot be multiple _________________ messages in message queue.
Select correct option:
WM_ PAINT
WM_TIMER
WM_QUIT
WParam

_______ acts as a buffer between applications and output devices.
Select correct option:
GDI
Kernel32
OS
CPU


If first non wide space character will be #, so it will be called _____.
Select correct option:
Preprocessor Directives
Preprocessor Folder Not Sure
Preprocessor Director
None of Given

The ___ function retrieves a handle to a display device context (DC) for the client area of a specified window or for the entire screen.
Select correct option:
GetHwnd
GetDC
GetGDI
GetStockObject

______________ tell the operating system about the characteristics and physical layout of its windows.
Select correct option:
Register Class
Object Class
Window Class
Common Class

Line can be drawn using _________ Functions
Select correct option:
MoveToEx and LineTo
SelectPts and DrawLine
SelectPts and DrawPOLY
None of the giving options

A Window that has a parent is called a ____ Window
Select correct option:
Parent
Main
Child
Owner Window

Whenever a window is resized, system sends "WM_SIZING" message to the application that owns the window
Select correct option:
TRUE
FALSE


___________ is used to check the predefined identifiers.
Select correct option:
#include
#ifdef
#def
#elif


 If we pass NULL value to "GetDC" function, it retrieves the DC for the:
Select correct option:
Entire Screen
Parent Window
Client Window
It does not retrieves DC

Two types of Subclassing are:
Select correct option:
Automated Subclassing and Manual Subclassing
Static Subclassing and Dynamic Subclassing
Local Subclassing and Global Subclassing
Instance Subclassing and Global Subclassing

Long chain of keywords in declaration can be shortened. Above line is the advantage of ______.
Select correct option:
Typedef
Struct
Union
None of given



Result of _________________ of two bits is TRUE (1) if only if both are TRUE (1)
Select correct option:
OR (I)
XOR
AND (&)
NOR

DOS boxes are also called ___________
Select correct option:
Main Window
Console Window
Dialogue Box
Arrays

________ function is used to invalidate a window or part of it
Select correct option:
InvalidateRect
InvalidateWindow
InvalidateClient
InvalidateApp



The _________ function draws a rectangle
Select correct option:
SetRectCoords(...)
ShowRectangle(...)
DrawRectangle(...)
Rectangle(...)

_________ is the handle to icon associated with Window Class.
Select correct option:
hIcon
hCursor
HINSTANCE
UINT

The SelectObject function selects an object into the specified:
Select correct option:
Object Context (OC)
Device Context (DC)
Window Context (WC)
Class Context (CC)

A thread can not share all of the its resources
Select correct option:
TRUE
FALSE

Whenever a window is resized, system sends "WM_SIZING" message to the application that owns the window
Select correct option:
TRUE
FALSE

Regarding Win32, an application cannot subclass a Window or Class that belongs to another process
Select correct option:
TRUE
FALSE

- Static variables are made on ___________ memory location
1. Fixed
2. Stack
3. Pointer
4. Variables
___________ is used to check the predefined identifiers.
1.#include
2. #ifdef
3.#def
4. #elif
Correct Choice : 2
From Lectuer # 5

Struct Person { char name[30]; //30 bytes int age; //4 bytes float height; //4 bytes }; struct Person abc, *ptr; ptr = &abc; ptr = ptr + 1; How many bytes will skip this statement?
38
40
39
No

Ptr -> age is equivalent to _______________


Name of Two dimensional array is the address of

First Column
First Row
Last Row
Last Column


Which languages are more close to machine language

Low Level Languages
Machine Level Language
C++
java

GDI is implemented through
GDI.dll
2. win32.dll
3. GDI32.dll
4. Kernel.dll

We can undefine already defined preprocessor directive using
1. #undef
2. #unifdef
3. #unenddef
4. None of given

Union Person { char name[30]; //30 bytes int age; float height; }; Union Person abc, *ptr; Ptr = &abc; ptr = ptr +1; How many bytes will skip after executing ptr = ptr +1

38 bytes will skip after executing ptr = ptr +1.
30 bytes will skip after executing ptr = ptr +1.       lec 4
31 bytes will skip after executing ptr = ptr +1.
32 bytes will skip after executing ptr = ptr +1.

There cannot be multiple _________________ messages in message queue.

WM_ PAINT
WM_TIMER
WM_QUIT
WParam

______________ tell the operating system about the characteristics and physical layout of its windows.
tell the operating system about the characteristics and physical layout of its windows.
Select correct option:
Register Class
Object Class
Window Class
Common Class
______________ inserts a WM_QUIT message in the program’s message queue.
PostQuitMessage (0)
WM_TIMER
KillTimer ()
DispatchMessage ()

_________ is unique identifier of the registered window class return by Registeredclass ()
Handle
Cursor
Object
ATOM

______________ is responsible for Stack Rewinding when called-function returns.

Function
Pointer
Called function
Caller function

The system paints the background for a window or gives the window, the opportunity to do so by sending it a _______ message Select correct option:
WM_FILLBKGND
WM_ERASEBKGND
WM_SYSCOMMAND
WM_OVERLAPPED

The _____ function writes a character string at the specified location, using the currently selected font, background color, and text color Select correct option:
printf(...)
PrintText(...)
TextOut(...)   
cout

When you release a key from keyboard, _______ message is sent to your application message queue.
Select correct option:
WM_KEYRELEASE
WM_KEYDOWN
WM_KEYPRESSED
WM_KEYUP

When we keep some key pressed for a long time, which one of the following technique keep the message queue concise
Older messages are discarded
Call the GetKeyState() function
Repeat count contains how many times WN_KEYDOWN message was sent.
There is no such technique

All threads share the
Virtual Address space
Global variables
Operating system resources of their respective processes
All of the given

A child window is always appears within the client area of its parent window.
True
False
_______is the smallest rectangle enclosing the portion of a window or client area affected by recent drawing operations
Accumulated Bounding Rectangle

_______ is one of user interface elements
Accelerator
Message Loop
WinProc
None of given options

A thread _________
Select correct option:
is a path of execution through a program
is smallest unit of execution that Win32 schedules
consists of a stack
All of given options




The system paints the background for a window or gives the window, the opportunity to do so by sending it a _______ message
Select correct option:
WM_FILLBKGND
WM_ERASEBKGND
WM_SYSCOMMAND
WM_OVERLAPPED




An active window is the one that:
Select correct option:
is at the bottom of Z-order
is owner of other windows
is at the top of Z-order
is owner of other windows


The _________ function draws a rectangle
Select correct option:
SetRectCoords(...)
ShowRectangle(...)
DrawRectangle(...)
Rectangle(...)




Which one of the following statements is not true?
Select correct option:
GDI is responsible for displaying text on the display devices
Kernel is responsible for thread synchronization
GDI is device dependent
Kernel is responsible for virtual memory management




We cannot convert the _______ into _________.
Select correct option:
Client area co-ordinates, screen co-ordinates
Screen co-ordinates, client area co-ordinates
Non-Client area co-ordinates, screen co-ordinates
Screen co-ordinates, non-client area co-ordinates




_________ is/are Pre-defined GDI object(s) in Windows.
Select correct option:
Pens
Brushes
Fonts
All of the given options




The first step in creating a window is registering a window class by _________
Select correct option:
Using DispatchMessage API
Filling a WNDCLASS structure and calling RegisterClass
Getting Window Handle
None of given options

The _____ function writes a character string at the specified location, using the currently selected font, background color, and text color
Select correct option:
printf(...)
PrintText(...)
TextOut(...)
cout


When you release a key from keyboard, _______ message is sent to your application message queue.
Select correct option:
WM_KEYRELEASE
WM_KEYDOWN
WM_KEYPRESSED
WM_KEYUP


_______ is one of user interface elements
Select correct option:
Accelerator
Message Loop
WinProc
None of given options


If we pass NULL value to "GetDC" function, it retrieves the DC for the:
Select correct option:
Entire Screen
Parent Window
Client Window
It does not retrieves DC

Two types of Subclassing are:
Select correct option:
Automated Subclassing and Manual Subclassing
Static Subclassing and Dynamic Subclassing
Local Subclassing and Global Subclassing
Instance Subclassing and Global Subclassing

Long chain of keywords in declaration can be shortened. Above line is the advantage of ______.
Select correct option:
Typedef
Struct
Union
None of given



Result of _________________ of two bits is TRUE (1) if only if both are TRUE (1)
Select correct option:
OR (I)
XOR
AND (&)
NOR

DOS boxes are also called ___________
Select correct option:
Main Window
Console Window
Dialogue Box
Arrays

________ function is used to invalidate a window or part of it
Select correct option:
InvalidateRect
InvalidateWindow
InvalidateClient
InvalidateApp



The _________ function draws a rectangle
Select correct option:
SetRectCoords(...)
ShowRectangle(...)
DrawRectangle(...)
Rectangle(...)

_________ is the handle to icon associated with Window Class.
Select correct option:
hIcon
hCursor
HINSTANCE
UINT

_______ is a technique that allows an application to intercept messages destined for another window.
Select correct option:
Subclassing
SuperClassing
Message Dispatching
None of given options

The SelectObject function selects an object into the specified:
Select correct option:
Object Context (OC)
Device Context (DC)
Window Context (WC)
Class Context (CC)

A thread can not share all of the its resources
Select correct option:
TRUE
FALSE



_______ acts as a buffer between applications and output devices.
Select correct option:
GDI
Kernel32
OS
CPU


If first non wide space character will be #, so it will be called _____.
Select correct option:
Preprocessor Directives
Preprocessor Folder Not Sure
Preprocessor Director
None of Given

The ___ function retrieves a handle to a display device context (DC) for the client area of a specified window or for the entire screen.
Select correct option:
GetHwnd
GetDC
GetGDI
GetStockObject

A ________ is a structure that defines a set of graphic objects and their associated attributes, as well as the graphic modes that affect output.
Select correct option:
Kernel
Pen
Bitmap
Device Context


What kind of messages can be display using messagebox function?
Select correct option:
Long messages
Short messages
Null values
None of the given

______________ tell the operating system about the characteristics and physical layout of its windows.
Select correct option:
Register Class
Object Class
Window Class
Common Class

Line can be drawn using _________ Functions
Select correct option:
MoveToEx and LineTo
SelectPts and DrawLine
SelectPts and DrawPOLY
None of the giving options

A Window that has a parent is called a ____ Window
Select correct option:
Parent
Main
Child
Owner Window

Whenever a window is resized, system sends "WM_SIZING" message to the application that owns the window
Select correct option:
TRUE
FALSE


___________ is used to check the predefined identifiers.
Select correct option:
#include
#ifdef
#def
#elif

What kind of messages can be display using messagebox function?
Select correct option:
Long messages
Short messages
Null values
None of the given

We can create a window using ______________
Select correct option:
RegisterClass ( )
WNDClass
CreateWindow ( )
DestroyWinndow( )

A thread _________
Select correct option:
is a path of execution through a program
is smallest unit of execution that Win32 schedules
consists of a stack
All of given options

A thread can not share all of the its resources
Select correct option:
TRUE
FALSE

If a window owns child Windows, and we destroy owner Window then _____________.
Select correct option:
Only owner window will be destroyed
Only its owned window will be destroyed
Both owner and owned Windows will be destroyed
The application will be crashed

A Window that has a parent is called a ____ Window
Select correct option:
Parent
Main
Child
Owner Window

_______ is a technique that allows an application to intercept messages destined for another window.
Select correct option:
Subclassing
SuperClassing
Message Dispatching
None of given options

_________ is unique identifier of the registered window class return by Registeredclass ()
Select correct option:
Handle
Cursor
Object
ATOM

______________ tell the operating system about the characteristics and physical layout of its windows.
Select correct option:
Register Class
Object Class
Window Class
Common Class

Result of _________________ of two bits is TRUE (1) if only if both are TRUE (1)
Select correct option:
OR (I)
XOR
AND (&)
NOR




Union Person { char name[30]; //30 bytes int age; float height; }; Union Person abc, *ptr; Ptr = &abc; ptr = ptr +1; How many bytes will skip after executing ptr = ptr +1.
Select correct option:
38 bytes will skip after executing ptr = ptr +1.
30 bytes will skip after executing ptr = ptr +1.
31 bytes will skip after executing ptr = ptr +1.
32 bytes will skip after executing ptr = ptr +1.

There cannot be multiple _________________ messages in message queue.
Select correct option:
WM_ PAINT
WM_TIMER
WM_QUIT
WParam



Ptr -> age is equivalent to _______________
Select correct option:
*ptr.age
ptr.age
(ptr).age
(*ptr).age

If a window owns child Windows, and we destroy owner Window then _____________.
Select correct option:
Only owner window will be destroyed
Only its owned window will be destroyed
Both owner and owned Windows will be destroyed
The application will be crashed

__________ handles user inputs and responds to user events independently.
Select correct option:
User-Interface Thread
Worker Thread
Kernel Thread
None of given options

___________ provides the functionality to create and manage screen windows and most basic controls
Select correct option:
GDI
Common Dialog Box
Common Control Library
User Interface

_______ acts as a buffer between applications and output devices.
Select correct option:
GDI
Kernel32
OS
CPU

The _____ function writes a character string at the specified location, using the currently selected font, background color, and text color
Select correct option:
printf(...)
PrintText(...)
TextOut(...)
cout



A _________ is commonly used to handle background tasks
Select correct option:
Worker thread
User Interface thread
Parent thread
Process thread

The system paints the background for a window or gives the window, the opportunity to do so by sending it a _______ message
Select correct option:
WM_FILLBKGND
WM_ERASEBKGND
WM_SYSCOMMAND
WM_OVERLAPPED





*(a+i) can also be written as ________________
Select correct option:
a [i]
a[i+1]
*a
*a+1

GDI presents _________
Select correct option:
Device-independent view
Device-dependent view
Monitor-dependent view
None of given



What will be the entry point to a Windows program?
Select correct option:
WinMain
Main
Java.main
System.main

GDI is implemented through ____________________
Select correct option:
GDI.dll
Win32.dll
GDI32.dll
Kernel

A ________ is a structure that defines a set of graphic objects and their associated attributes, as well as the graphic modes that affect output.
Select correct option:
Kernel
Pen
Bitmap
Device Context




Post a Comment

Previous Post Next Post