Order PDF of any content from our website with a little minor Fee to donate for hard work. Online MCQs are fully free but PDF books are paid. For details: contact whatsapp +923028700085 Important notes based PDF Books are available in very little price, starting from 500/-PKR; Order Now: contact whatsapp +923028700085

VU Past Papers CS410 – Windows Programming MCQs solved

Q1: For showing Dialog we can use “ShowWindow(…)” function.
(A) TRUE
(B) FALSE
Answer: (B) FALSE

Q2: When a menu item is clicked, WM_COMMAND message is sent and ID of this menu item is sent in:
(A) wParam
(B) lParam
(C) hInstance
(D) HWND
Answer: (A) wParam

Q3: The “GetDlgItem” function retrieves a ______ to a control.
(A) Handle
(B) Pointer
(C) Object
(D) None of the given options
Answer: (A) Handle

Q4: The WM_INITDIALOG message is sent to the dialog box procedure:
(A) Immediately before a dialog box is displayed
(B) Immediately after a dialog box is displayed
(C) When DialogProc is called
(D) When HideDialog is called
Answer: (A) Immediately before a dialog box is displayed

Q5: Virtual key code is defined by:
(A) Kernel
(B) Application
(C) System
(D) None of given
Answer: (C) System

Q6: In which parameter of “CreateWindow” function, we can specify the Menu.
(A) hMenu
(B) hInstance
(C) hWnd
(D) dialogBox
Answer: (A) hMenu

Q7: Neither the user nor the application can make the owner window active until the modal dialog box is destroyed.
(A) True
(B) False
Answer: (A) True

Q8: When we keep some key pressed for a long time, which technique keeps the message queue concise?
(A) Older messages are discarded
(B) Call the GetKeyState() function
(C) Repeat Count contains how many times WM_KEYDOWN message was sent
(D) There is no such technique
Answer: (C) Repeat Count contains how many times WM_KEYDOWN message was sent

Q9: What is the file extension of the resource file?
(A) .rc
(B) .cr
(C) .ico
(D) .txt
Answer: (A) .rc

Q10: Which one of the following controls cannot receive input focus?
(A) Edit
(B) Static
(C) Option Button
(D) Push Button
Answer: (B) Static

Q11: The DialogProc function is used to:
(A) Create a Dialog
(B) Destroy a Dialog
(C) Hide a Dialog
(D) Process messages sent to a modal or modeless dialog box
Answer: (D) Process messages sent to a modal or modeless dialog box

Q12: To retrieve the identifier of the menu item at a specified position, we can use:
(A) GetMenuItemID or GetMenuItemInfo function
(B) Only GetMenuItemID function
(C) We have to use both GetMenuItemID and GetMenuItemInfo
(D) None of the given functions
Answer: (A) GetMenuItemID or GetMenuItemInfo function

Q13: When you release a key from keyboard, ______ message is sent to your application message queue.
(A) WM_KEYRELEASE
(B) WM_KEYDOWN
(C) WM_KEYPRESSED
(D) WM_KEYUP
Answer: (D) WM_KEYUP

Q14: When an application receives a keystroke message, ______ code is there in wParam parameter.
(A) ASCII key
(B) Normal key
(C) Extended key
(D) Virtual key
Answer: (D) Virtual key

Q15: Device-independent value represents:
(A) Virtual key code
(B) Key code
(C) Read only code
(D) Mix code
Answer: (A) Virtual key code

Q16: It is not possible to create a dialog box that has no owner.
(A) True
(B) False
Answer: (B) False

Q17: An application destroys a modal dialog box by using the function:
(A) EndDialog
(B) TerminateDialog
(C) DestroyDialog
(D) DestroyModalDialog
Answer: (A) EndDialog

Q18: If we press an extended key from keyboard, the number of byte(s) sent to keyboard buffer is:
(A) 1
(B) 2
(C) 3
(D) 4
Answer: (B) 2

Q19: By default all resources are Discardable.
(A) True
(B) False
Answer: (B) False

Q20: Win32-based applications are event-driven.
(A) TRUE
(B) FALSE
Answer: (A) TRUE

Q21: System sends the item’s identifier to the owner window:
(A) When the user chooses a command item from a menu
(B) When the system chooses a command item from a menu
(C) When the user clicks on any window area
(D) When the system de-selects the item menu
Answer: (A) When the user chooses a command item from a menu

Q22: An accelerator does not always need to correspond to a menu command.
(A) TRUE
(B) FALSE
Answer: (A) TRUE

Q23: If the load menu function fails, the return value will be:
(A) 0
(B) False
(C) Null
(D) 1
Answer: (A) 0

Q24: Which function is not used to handle a caret?
(A) CreateCaret()
(B) DestroyCaret()
(C) SetCaretPos()
(D) DenyCaret()
Answer: (D) DenyCaret()

Q25: In the case of extended keyboard characters, first byte of keyboard buffer contains ______ and second byte contains ______.
(A) scan code, extended code
(B) extended code, scan code
(C) 0, scan code
(D) scan code, 0
Answer: (A) scan code, extended code

Q26: Who generates a unique handle for each menu?
(A) System
(B) User
(C) Dialog box
(D) Menu Items
Answer: (A) System

Q27: An application destroys a modal dialog box by using:
(A) EndDialog
(B) TerminateDialog
(C) DestroyDialog
(D) DestroyModalDialog
Answer: (A) EndDialog

Q28: Which function loads the specified menu resource from the executable (.exe) file associated with an application instance?
(A) LoadMenu()
(B) Load_Menu()
(C) Load_M()
(D) None of given
Answer: (A) LoadMenu()

Q29: Result of AND of two bits is TRUE (1) only if both are TRUE (1).
(A) OR (|)
(B) XOR
(C) AND (&)
(D) NOR
Answer: (C) AND (&)

Q30: ______ acts as a buffer between applications and output devices.
(A) GDI
(B) Kernel32
(C) OS
(D) CPU
Answer: (A) GDI

Q31: If first non-space character is #, it will be called:
(A) Preprocessor Directives
(B) Preprocessor Folder
(C) Preprocessor Director
(D) None of Given
Answer: (A) Preprocessor Directives

Q32: Ptr->age is equivalent to:
(A) *ptr.age
(B) ptr.age
(C) (ptr).age
(D) (*ptr).age
Answer: (D) (*ptr).age

Q33: The system paints the background for a window by sending a ______ message.
(A) WM_FILLBKGND
(B) WM_ERASEBKGND
(C) WM_SYSCOMMAND
(D) WM_OVERLAPPED
Answer: (B) WM_ERASEBKGND

Q34: *(a+i) can also be written as:
(A) a[i]
(B) a[i+1]
(C) *a
(D) *a+1
Answer: (A) a[i]

Q35: GDI presents:
(A) Device-independent view
(B) Device-dependent view
(C) Monitor-dependent view
(D) None of given
Answer: (A) Device-independent view

Q36: GDI is implemented through:
(A) GDI.dll
(B) Win32.dll
(C) GDI32.dll
(D) Kernel
Answer: (C) GDI32.dll

Q37: A ______ is a structure that defines a set of graphic objects and their associated attributes, as well as the graphic modes that affect output.
(A) Kernel
(B) Pen
(C) Bitmap
(D) Device Context
Answer: (D) Device Context

Q38: Static variables are made on ______ memory location.
(A) Fixed
(B) Stack
(C) Pointer
(D) Variables
Answer: (A) Fixed

Q39: GDI stands for:
(A) Graphics Driver Interface
(B) Graphics Device Interface
(C) Graphics Direct Interface
(D) None of the given options
Answer: (B) Graphics Device Interface

Q40: What kind of messages can be displayed using message box function?
(A) Long Messages
(B) Short Messages
(C) Null Messages
(D) None of Given
Answer: (B) Short Messages

Q41: ______ is commonly used to handle background tasks.
(A) Worker thread
(B) User Interface thread
(C) Parent thread
(D) Process thread
Answer: (A) Worker thread

Q42: Graphical device interface communicates between application and ______ driver.
(A) Port
(B) Operating System
(C) Device
(D) Kernel
Answer: (C) Device

Q43: Condition(s) in which WM_PAINT message may be sent is/are:
(A) A dialog box is maximized
(B) A drop-down menu disappears
(C) A tooltip is displayed and then hides
(D) All of the given options
Answer: (D) All of the given options

Q44: If we pass NULL value to “GetDC” function, it retrieves the DC for the:
(A) Entire Screen
(B) Parent Window
(C) Client Window
(D) It does not retrieve DC
Answer: (A) Entire Screen

Q45: The function retrieves a handle to a display device context (DC) for the client area of a specified window or for the entire screen:
(A) GetHwnd
(B) GetDC
(C) GetGDI
(D) GetStockObject
Answer: (B) GetDC

Q46: Preprocessor directive starts with ______ symbol.
(A) #
(B) &
(C) *
(D) %
Answer: (A) #

Q47: The window ______ is the color or pattern used to fill the client area before a window begins drawing.
(A) Caption
(B) Color Palette
(C) Background
(D) Foreground
Answer: (C) Background

Q48: A window that has a parent is called a ______ window.
(A) Parent
(B) Main
(C) Child
(D) Owner Window
Answer: (C) Child

Q49: ______ tells the operating system about the characteristics and physical layout of its windows.
(A) Register Class
(B) Object Class
(C) Window Class
(D) Common Class
Answer: (C) Window Class

Q50: The SelectObject function selects an object into the specified:
(A) Object Context (OC)
(B) Device Context (DC)
(C) Window Context (WC)
(D) Class Context (CC)
Answer: (B) Device Context (DC)

Q51: In the GDI environment, there are two working spaces:
(A) Logical and the Physical
(B) Local and the Global
(C) Static and the Dynamic
(D) Direct and the Indirect
Answer: (A) Logical and the Physical

Q52: ______ is the handle to icon associated with Window Class.
(A) hIcon
(B) hCursor
(C) HINSTANCE
(D) UINT
Answer: (A) hIcon

Q53: Name of the three-dimensional array is the address of:
(A) First Row
(B) First Element
(C) First page
(D) Last Page
Answer: (A) First Row

Q54: We can undefine already defined preprocessor directive using:
(A) #undef
(B) #unifdef
(C) #unenddef
(D) None of given
Answer: (A) #undef

Q55: The function writes a character string at the specified location, using the currently selected font, background color, and text color:
(A) printf(…)
(B) PrintText(…)
(C) TextOut(…)
(D) Cout
Answer: (C) TextOut(…)

Q56: ______ is responsible for stack rewinding when called-function returns.
(A) Function
(B) Pointer
(C) Called function
(D) Caller function
Answer: (D) Caller function

Q57: DC stands for: Device Context (DC)

Q58: ______ is used to check the predefined identifiers.
(A) #include
(B) #ifdef
(C) #def
(D) #elif
Answer: (B) #ifdef

Q59: Specific memory areas where parameters are copied are:
(A) Stacks
(B) Arrays
(C) Queues
(D) Lists
Answer: (A) Stacks

Q60: We can create a window using:
(A) RegisterClass()
(B) WNDClass
(C) CreateWindow()
(D) DestroyWindow()
Answer: (C) CreateWindow()

Q61: Identifier is not replaced if it appears:
(A) In a comment
(B) Within a string
(C) As a part of a long identifier
(D) All of the given
Answer: (D) All of the given

Q62: How many bytes will skip: ptr = &abc; ptr = ptr + 1;
(A) 38
(B) 40
(C) 39
(D) Nothing will skip
Answer: (B) 40

Q63: ______ is unique identifier of the registered window class returned by RegisteredClass()
(A) Handle
(B) Cursor
(C) Object
(D) ATOM
Answer: (D) ATOM

Q64: DOS boxes are also called:
(A) Main Window
(B) Console Window
(C) Dialogue Box
(D) Arrays
Answer: (B) Console Window

Q65: Long chain of keywords in declaration can be shortened. This is the advantage of:
(A) Typedef
(B) Struct
(C) Union
(D) None of given
Answer: (A) Typedef

Q66: Which languages are more close to machine language:
(A) Low Level Languages
(B) Machine Level Language
(C) C++
(D) Java
Answer: (A) Low Level Languages

Contents Copyrights Reserved By T4Tutorials