Ads Top

SOLVED MCQ’S VISUAL PROGRAMMING



1.        We can undefined already defined preprocessor directive using
► #undef
► #unifdef
► #unenddef
► None of given
2.        Identifier is not replaced if it appears

► In a comment
► With in a string
► As a part of a long identifier
► All of given

3.    Union Person
{
char name[30];
//30 bytes
int age;
float height;
};
How many bytes will skip after executing ptr = ptr +1.
Union Person abc, *ptr;
Ptr = &abc;
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.
► 38 bytes will skip after executing ptr = ptr +1.

4.        C language is an extensible language.

► True
► False

5.        ______ is/are the type(s) of Logical Brushes.

► Solid
► Hatched
► Patched
► All of the given

6.        ____________ is/are type(s) of macro.

► Object-like macro
► Function-like macro
► All of the given
► None of the given

7.        __________ macro expands to the constant 1, to signify that this compiler conforms to ISO standard C.

► _STD_
► _STDC_
► _STDC_HOSTED_
► _STDC_VERSION_

8.        Char (*ptrString)[4][2]; How many bytes will be skipped by the statement ptrString += 2?

► 16
► 1
► 4
► 8

9.        If we destroy owner window then _____________.

► Only owner window will be destroyed
► Only its owned window will be destroyed
► Both owner and owned window will be destroyed
► The application will be crashed

10.     Choose Command line user interface

Ø  MS DOS
Ø  MS Windows
Ø  MS Word
Ø  MS Visio

11.     Which of the following is not a feature of windows programming?

1.        Resource sharing
2.        Device independent programming
3.        Multitasking
4.        Single path of execution

12.     Window Operating System Do not give us

1.        Direct memory access
2.        Direct access video ports
3.        Direct memory interrupt
4.        All of the given

13.     *(a+i) can also be written as ________________

1.        a[i]
2.        a[i+1]
3.        *a
4.        *a+1

14.     char (*ptrString)[4][2]; How many bytes will be skipped by the statement ptrString += 2?

Correct Answer is 8

15.     Name of Two dimensional array is the address of _________

1.        First Column
2.        First Row
3.        Last Row
4.        Last Column

16.      What is a function pointer?
1.        A pointer that passes as an argument to the function
2.        A pointer that is declared inside the function
3.        A pointer that points to the starting address of the function
4.        A pointer that takes return value of some other function

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

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

18.     We can display symbolic constants instead of numeric values using:

1.        Structures
2.        Enumeration
3.        Unions
4.        Typedef



19.     ————-macro expands to the constant 1, to signify that this compiler conforms to
ISO Standard C

1.        __STDC__
2.        __STDC_VERSION__
3.        __STDC_HOSTED__
4.        None of the given

20.     Identifier is not replaced if it appears

1.        In a comment
2.        Within a string
3.        As a part of a long identifier
4.        All of given

21.     Preprocessor directive starts with _________ symbol.

1.        #
2.        &
3.        *
4.        %

22.     We can undefine already defined preprocessor directive using

1.        #undef
2.        #unifdef
3.        #unenddef
4.        None of given

23.     ___________ is used to check the predefined identifiers.

1.        #include
2.        #ifdef
3.        #def
4.        #elif

24.     ____________ is/are type(s) of macro

1.        Object-like macro
2.        Function-like macro
3.        Both of the Given
4.        None of the given

25.     Result of _________________ of two bits is TRUE (1) if only if both are TRUE (1)

1.        OR( | )
2.        XOR
3.        AND(&)
4.        NOR

26.     Specific memory areas where parameters are copied are ______________

1.        Stacks
2.        Arrays
3.        Queues
4.        Lists

27.     Static variables are made on ___________ memory location

1.        Fixed
2.        Stack
3.        Pointer
4.        Variables

28.     We want to declare a variable in a function such that whenever the function is called, the variable is not reinitialized. The storage class of the variable must be:

1.        Static
2.        Auto
3.        Extern
4.        All of the given options

29.     ________________ is responsible for Stack Rewinding when called-function returns.

1.        Function
2.        Pointer
3.        called function
4.        Caller function

30.     DOS boxes are also called ___________

1.        Main window
2.        Consol window
3.        dialogue box
4.        Arrays

31.     GDI is implemented through ____________________

1.        GDI.dll
2.        win32.dll
3.        GDI32.dll
4.        Kernel.dll

32.     GDI stands for __________

1.        Graphics Driver Interface
2.        Graphics Device Interface
3.        Graphics Direct Interface
4.        None of the given options

33.     Pump the blood in the whole body of a human being. This work done by the heart but what will be the heart of an operation system.

1.        Kernel
2.        Win32
3.        Virtual Memory
4.        ROM

34.     What kind of messages can be display using messagebox function?

1.        Long Messages
2.        Short Messages
3.        Null Massages
4.        None of Given

35.     What will be the entry point to a Windows program?

1.        WinMain
2.        Main
3.        Java.main
4.        System.main

36.     ______ is/are the type(s) of Logical Brushes.

1.        Solid
2.        Hatched
3.        Pattern
4.        All of the given

37.     Message loop ends when the GetMessage() function removes the following message from the message queue:

1.        WM_QUIT
2.        WM_SETFOCUS
3.        WM_PAINT
4.        WM_SYSCOMMAND

38.     Message loop ends when the GetMessage() function removes the following message from the message queue:

·         WM_SETFOCUS
·         WM_PAINT
·         WM_SYSCOMMAND
·         WM_QUIT

39.     We want to declare a variable in a function such that whenever the function is called, the variable is not reinitialized. The storage class of the variable must be:

·         Auto
·         Static
·         Extern
·         All of the given options

40.     What is a function pointer?

·         A pointer that passes as an argument to the function
·         A pointer that is declared inside the function Some returning pointer
·         A pointer that takes return value of some other function
·         A pointer that points to the starting address of the function

41.     How many parameters do Win Main function contains
·         1
·         2
·         3
·         4

42.     Which of the following class of window is pre-registered?

·         main window
·         pop-up window
·         system window
·         child window
·         parent window

43.     Which of the following is not a user defined data type?

·         Structures
·         Enumerations
·         Unions
·         Typedefs
·         None of the above

44.     Which of the following is not a feature of windows programming?

·         Resource sharing
·         Device independent programming
·         Multitasking
·         Single path of execution
·         GDI (Graphics Device interface)

45.     ——- is a subsystem responsible for displaying text and images on display
devices and printers.

·         Brushes
·         Pens
·         GDI (Graphics Device Interface)
·         Kernel
·         Operating system

46.         Union person { Char name[30]; Int age; Float height; }; void main(){ person abc; } How many bytes will be allocated to abc;

·         42
·         30
·         38
·         36

47.     __Line__ convert the current _____ in program.



► Line No
► File No
► Page No
► None of given
48.     Which one of the following is not a nonqueued message?

1.        WM_ACTIVATE
2.        WM_SETFOCUS
3.        WM_WINDOWPOSCHANGED
4.        WM_SETCURSOR

49.     A _________ is commonly used to handle background tasks

1.        Worker thread
2.        User Interface thread
3.        Parent thread
4.        Process thread

50.     If we destroy owner window then _____________.

1.        Only owner window will be destroyed
2.        Only its owned window will be destroyed
3.        Both owner and owned window will be destroyed
4.        The application will be crashed

51.     The basic building block for displaying information in the “Microsoft Windows” graphical environment is __________

1.        Messeage Queue
2.        WinMain
3.        Message Loop
4.        Window

52.     _______ is one of user interface elements

1.        Accelerator
2.        Message Loop
3.        Win Proc
4.        None of given options

53.     ________ determines that, which threads should run and when they should run?

1.        Scheduler
2.        Thread itself
3.        Messages
4.        None of the given options

54.     __________ handles user inputs and responds to user events independently.

1.        User-Interface Thread
2.        Worker Thread
3.        Kernel Thread
4.        None of given options

55.     ___________ provides the functionality to create and manage screen windows and most basic controls.

1.        GDI
2.        Common Dialog Box
3.        Common Control library
4.        User Interface

56.     For whom system registers the system class

1.        Window class
2.        Register class
3.        Process
4.        None of given

57.     The first step in creating a window is registering a window class by _________

1.        Using Dispatch Message API
2.        Filling a WNDCLASS structure and calling Register Class
3.        Getting Window Handle
4.        None of given options

58.     Two types of Subclassing are:

1.        Automated Sub classing and Manual Sub classing
2.        Static Sub classing and Dynamic Sub classing
3.        Local Sub classing and Global Sub classing
4.        Instance Sub classing and Global Sub classing


59.     Condition(s) in which WM_PAINT message may be sent is/are ______________

1.        A dialog box is maximized
2.        A drop-down menu disappears
3.        A tool tip is displayed and then it hides
4.        All of the given options

60.     Device-in depended value represents

1.        Virtual key code
2.        Key code
3.        READ Only code
4.        None of Given

61.     In which parameter of “Create Window” function, we can specify the Menu.

1.        instance
2.        hmenu
3.        hWin
4.        dialoge box

62.     Which function loads the specified menu resource from the executable (.exe) file associated with an application instance.

1.        LoadMenu()
2.        Load_Menu()
3.        Load_M()
4.        non of given

63.     Which message is generated by the system only when any part of application window becomes invalid?

► WM_BRUSH
► WM_PAINT
► WM_COLOR
► WM_CANVAS

64.     Which GDI environmental space has limited colors?

► Logical space
► Physical Space
► Virtual Space
► Default Space

65.     For whom system registers the system class.

► Window class
► Register class
► Process
► None of given

66.     Choose Command line user interface

► MS DOS
► MS Windows
► MS Word
► MS Visio

67.     Pump the blood in the whole body of a human being. This work done by the heart but what will be the heart of an operation system.

► Kernel
► Win32
► Virtual Memory
► ROM

68.     If we destroy owner window then ___________.

► Only owner window will be destroyed
► Only its owned window will be destroyed
► Both owner and owned window will be destroyed
► The application will be crashed

69.     To maximize the flexibility of the process’s memory management system can moves pages of physical memory to and from a paging file on the disk.

·         True
·         False

70.     The pages size in x86 Computers is ____.

·         4 bits
·         4 bytes
·         4 Kilobytes
·         4 Maga Bytes
·         4 Gaga Bytes

71.     Which of the following class of window is pre-registered?

1.        main window
2.        pop-up window
3.        system window
4.        child window

72.     GDI presents _________

1.        Device-independent view
2.        Device-dependent view
3.        Monitor-dependent view
4.        None of given

73.     Graphical device interface communicates between application and _______ driver

1.        Port
2.        Operating System
3.        Device
4.        Kernel

74.     If we pass NULL value to “GetDC” function, it retrieves the DC for the:

1.        Entire Screen
2.        Parent Window
3.        Client Window
4.        It does not retrieves DC

75.     The ___ function retrieves a handle to a display device context (DC) for the client area of a specified window or for the entire screen.

1.        GetHwnd
2.        GetDC
3.        GetGDI
4.        GetStockObject

76.     The _____ function writes a character string at the specified location, using the currently selected font, background color, and text color

1.        printf(…)
2.        PrintText(…)
3.        TextOut(…)
4.        cout

77.     _______ acts as a buffer between applications and output devices.

1.        GDI
2.        Kernel32
3.        OS
4.        CPU

78.     _________ is the smallest rectangle enclosing the portion of a window or client area affected by recent drawing operations

1.        Invalid Rectangle
2.        Accumulated Bounding Rectangle
3.        Accumulated Client Rect
4.        All of the given options

79.     A ________ is a structure that defines a set of graphic objects and their associated attributes, as well as the graphic modes that affect output.

1.        Kernel
2.        Pen
3.        Bitmap
4.        Device Context

80.     The size of pages depends on the host computer.

·         True
·         False

81.     Physical Storage and the Virtual Address Space of each process is organized in ____.

·         Pages
·         Page Map
·         paging file
·         Map

82.     A disk file used to increase the amount of physical storage is known as _____.

·         Fiber
·         page map
·         paging file
·         pages

83.     ____________ is a reserve word in resource file.

·         Statement
·         Cursor
·         Bitmap
·         Icon.

84.     _______________ function is used to invalidate a window or part of it.

·         BeginPaint
·         InvalidateRect
·         EndPaint
·         DefWindowProc

85.     If bind function fails then what kind of error it will return.

·         SOCKET_ERROR
·         SOCKET_FAILED
·         SOCKET_FAILED
·         None of the given

86.     Consider the following statements written in a DLL: __declspec (dllexport) intFactorial(int); int Average(int, int); Which of the following statements is true about the above statements?

► Factorial() and Average() are 2 public functions of the DLL
► Average() is the only public functions of the DLL
► Factorial()is the only public functions of the DLL
► This DLL does not have any public functions

87.     Which one of the following operations is common to both client and server sockets:


► Bind
► Listen
► Accept
► Send

88.     What will happen if we use PostThreadMessage for a thread that does not have the message queue?

► Nothing will happen
► It will cause a run time error
► Thread will resume processing
► Its message queue will be created

89.     To create semaphore objects which function use by thread?

► CreateSemaphore()
► CreateSemaobject()
► CreateObject()
► Create()

90.     RFC stands for

► Request for comments
► Request of connects
► Reference for connect
► Request for cancels

91.     Consider the following statements written in a DLL: __declspec (dllexport) int Factorial(int); int Average(int, int); Which of the following statements is true about the above statements?

► Factorial() and Average() are 2 public functions of the DLL
► Average() is the only public functions of the DLL
► Factorial()is the only public functions of the DLL
► This DLL does not have any public functions

92.     Which one of the following operations is common to both client and server sockets:

► Bind
► Listen
► Accept
► Send

93.     What will happen if we use PostThreadMessage for a thread that does not have the message queue?

► Nothing will happen
► It will cause a run time error
► Thread will resume processing
► Its message queue will be created

94.     To create semaphore objects which function use by thread?

► CreateSemaphore()
► CreateSemaobject()
► CreateObject()
► Create()

95.     RFC stands for

► Request for comments
► Request of connects
► Reference for connect
► Request for cancels

96.     When every any GDI function call is made or send message or post message function calls are made then which queuing will create?

► Message Queuing
► Function Queuing
► Process Queuing <not sure>
► None of the given

97.     Copy-on-write protection is an optimization that allows multiple processes to map their virtual address spaces such that they share a physical page until one of the processes modifies the page. This definition belongs to which technique.

► Lazy evaluation
► Fast evaluation
► Process evaluation
► None of the given

98.     If the dialog box procedure returns FALSE, then which message handling will be performed?

► Default
► Instance
► Object
► None of the given

99.     How many parameters take the dialog box procedure?

► 1
► 0
► 6
► 4

100.  What does hmenu mean?

► Handle to window
► Handle to the menu
► Handle to child window
► Handle to highest menu

101.    When the system sends the item’s identifier to the owner window?

► When the user chooses a command item from a menu
► When the system chooses a command item from a menu
► When the user click on any window area
► When the system de-select the item menu

102.  If the load menu function fails so what will be the return value.

► 0
► False
► Null   <not sure>
► 1

103.  Who generate a unique handle for each menu?

► System
► User
► Dialog box
► Menu Items

104.  Which message function determined where to send message.

► DispatchMessage
► MessageDispatch
► GetMessage
► None of the given

105.  In 32-bit windows programming, we are freed from the curse of 64k segments.

► True
► False

106.  Which function we use to register windows classes in window?

► RegisterClass();
► RegistersClass();
► RegisterWin();
► WinReg();

107.  Which operator manipulates individual bits?

►Bitwise Operators
► Linked Bits
► Individual Bytes
► Linked Bytes

108.      Union Person
{
char name[30];
//30 bytes
int age;
float height;
};
How many bytes will skip after executing ptr = ptr +1.
Union Person abc, *ptr;
Ptr = &abc;
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.
► 38 bytes will skip after executing ptr = ptr +1.

109.  double *ptr is pointer variable which stores double type address.

► True
► False

110.  ____________ is/are type(s) of macro.

► Object-like macro
► Function-like macro
► All of the given
► None of the given

111.  Which of the following is not true about HTTP?

► It is a protocol
► It is stateless
► It is more difficult to implement than state-aware protocols
► A web browser is HTTP client

112.  For TCP/IP, if the port is specified as zero, the service provider assigns a unique port to the application with a value between ________________.

► 1 and 1024
► 1 and 4000
► 1024 and 5000 <Not Sure>
► 1024 and 10240

113.  All bits in high word of a 32-bit pointer are ____________.

► Non-zero
► Zero <Not Sure>
► Two
► None of the given

114.  An accelerator _____________ to correspond to a menu command.

► Needs
► Needs not
► Is essential
► Is necessary

115.  CGI stands for:

► Control Graphics Interface
► Common Graphics Interface
► Control Gateway Interface
► Common Gateway Interface

116.  Which one of the following operations is common to both client and server sockets:

► Send
► Connect
► Accept
► Bind

117.  DLU is:
► Handle of a dialog
► Handle of a modal dialog only
► Measure of distance within a dialog box
► Name of a dialog

118.  Neither the user nor the application can make the owner window active until the _______ is destroyed.

► Modeless dialog box
► Modal dialog box
► Child control
► All of the given

119.  When a menu item is clicked, __________ message is sent.

► WM_MENUITEMCLICKED
► WM_MENUCLICKED
► WM_COMMAND
► WM_PAINT

120.  How many WM_CHAR messages will be generated when Shift+A key combination is pressed from keyboard and we haven’t called TranslateMessage() before calling DispatchMessage() function?

► 0
► 1
► 2
► 3

121.  The total amount of storage available to all executing processes is the sum of the physical memory and the free space on disk available to the paging file.

·         True
·         False


No comments:

Powered by Blogger.