We can undefine already defined preprocessor directive using
► #undef
► #unifdef
► #unenddef
► None of given
Identifier is not replaced if it appears
► In a comment
► With in a string
► As a part of a long identifier
► All of given
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.
C language is an extensible language.
► True
► False
______ is/are the type(s) of Logical Brushes.
► Solid
► Hatched
► Patched
► All of the given
____________ is/are type(s) of macro.
► Object-like macro
► Function-like macro
► All of the given
► None of the given
__________ macro expands to the constant 1, to signify that this compiler conforms to ISO standard C.
► _STD_
► _STDC_
► _STDC_HOSTED_
► _STDC_VERSION_
char
(*ptrString)[4][2];
How many bytes will be skipped by the statement ptrString += 2?
► 16
► 1
► 4
► 8
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
Choose Command line user interface
1. MS DOS
2. MS Windows
3. MS Word
4. MS Visio
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
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
*(a+i) can also be written as ________________
1. a[i]
2. a[i+1]
3. *a
4. *a+1
char (*ptrString)[4][2]; How many bytes will be skipped by the statement ptrString += 2?
Correct Answer is 8
Name of Two dimensional array is the address of _________
1. First Column
2. First Row
3. Last Row
4. Last Column
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
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.
We can display symbolic constants instead of numeric values using:
1. Structures
2. Enumeration
3. Unions
4. Typedef
————-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
Identifier is not replaced if it appears
1. In a comment
2. With in a string
3. As a part of a long identifier
4. All of given
Preprocessor directive starts with _________ symbol.
1. #
2. &
3. *
4. %
We can undefine already defined preprocessor directive using
1. #undef
2. #unifdef
3. #unenddef
4. None of given
___________ is used to check the predefined identifiers.
1. #include
2. #ifdef
3. #def
4. #elif
____________ is/are type(s) of macro
1. Object-like macro
2. Function-like macro
3. Both of the Given
4. None of the given
Result of _________________ of two bits is TRUE (1) if only if both are TRUE (1)
1. OR( | )
2. XOR
3. AND(&)
4. NOR
Specific memory areas where parameters are copied are ______________
1. Stacks
2. Arrays
3. Queues
4. Lists
Static variables are made on ___________ memory location
1. Fixed
2. Stack
3. Pointer
4. Variables
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
________________ is responsible for Stack Rewinding when called-function returns.
1. Function
2. Pointer
3. called function
4. Caller function
DOS boxes are also called ___________
1. Main window
2. Consol window
3. dialogue box
4. Arrays
GDI is implemented through ____________________
1. GDI.dll
2. win32.dll
3. GDI32.dll
4. Kernel.dll
GDI stands for __________
1. Graphics Driver Interface
2. Graphics Device Interface
3. Graphics Direct Interface
4. None of the given options
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
What kind of messages can be display using messagebox function?
1. Long Messages
2. Short Messages
3. Null Massages
4. None of Given
What will be the entry point to a Windows program?
1. WinMain
2. Main
3. Java.main
4. System.main
______ is/are the type(s) of Logical Brushes.
1. Solid
2. Hatched
3. Pattern
4. All of the given
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
Message loop ends when the GetMessage() function removes the following message from the message queue:
WM_SETFOCUS
WM_PAINT
WM_SYSCOMMAND
WM_QUIT
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
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
How many parameters do WinMain function contains
1
2
3
4
Which of the following class of window is pre-registered?
main window
pop-up window
system window
child window
parent window
Which of the following is not a user defined data type?
Structures
Enumerations
Unions
Typedefs
None of the above
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)
——- is a subsystem responsible for displaying text and images on display
devices and printers.
Brushes
Pens
GDI (Graphics Device Interface)
Kernel
Operating system
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
__Line__ convert the current _____ in program.
► Line No
► File No
► Page No
► None of given
Which one of the following is not a nonqueued message?
1. WM_ACTIVATE
2. WM_SETFOCUS
3. WM_WINDOWPOSCHANGED
4. WM_SETCURSOR
A _________ is commonly used to handle background tasks
1. Worker thread
2. User Interface thread
3. Parent thread
4. Process thread
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
The basic building block for displaying information in the “Microsoft Windows” graphical environment is __________
1. Messeage Queue
2. WinMain
3. Message Loop
4. Window
_______ is one of user interface elements
1. Accelerator
2. Message Loop
3. WinProc
4. None of given options
________ determines that, which threads should run and when they should run?
1. Scheduler
2. Thread itself
3. Messages
4. None of the given options
__________ handles user inputs and responds to user events independently.
1. User-Interface Thread
2. Worker Thread
3. Kernel Thread
4. None of given options
___________ 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
For whom system registers the system class
1. Window class
2. Register class
3. Process
4. None of given
The first step in creating a window is registering a window class by _________
1. Using DispatchMessage API
2. Filling a WNDCLASS structure and calling RegisterClass
3. Getting Window Handle
4. None of given options
Two types of Subclassing are:
1. Automated Subclassing and Manual Subclassing
2. Static Subclassing and Dynamic Subclassing
3. Local Subclassing and Global Subclassing
4. Instance Subclassing and Global Subclassing
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
Device-independed value represents
1. Virtual key code
2. Key code
3. READOnly code
4. None of Given
In which parameter of “CreateWindow” function, we can specify the Menu.
1. hInstance
2. hmenu
3. hWin
4. dialoge box
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
Which message is generated by the system only when any part of application window becomes invalid?
► WM_BRUSH
► WM_PAINT
► WM_COLOR
► WM_CANVAS
Which GDI environmental space has limited colors?
► Logical space
► Physical Space
► Virtual Space
► Default Space
For whom system registers the system class.
► Window class
► Register class
► Process
► None of given
Choose Command line user interface
► MS DOS
► MS Windows
► MS Word
► MS Visio
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
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
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
The pages size in x86 Computers is ____.
4 bits
4 bytes
4 Kilobytes
4 Maga Bytes
4 Gaga Bytes
Which of the following class of window is pre-registered?
1. main window
2. pop-up window
3. system window
4. child window
GDI presents _________
1. Device-independent view
2. Device-dependent view
3. Monitor-dependent view
4. None of given
Graphical device interface communicates between application and _______ driver
1. Port
2. Operating System
3. Device
4. Kernel
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
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
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
_______ acts as a buffer between applications and output devices.
1. GDI
2. Kernel32
3. OS
4. CPU
_________ 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
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
The size of pages depends on the host computer.
True
False
Physical Storage and the Virtual Address Space of each process is organized in
____.
Pages
Page Map
paging file
Map
A disk file used to increase the amount of physical storage is known as _____.
Fiber
page map
paging file
pages
____________ is a reserve word in resource file.
Statement
Cursor
Bitmap
Icon.
_______________ function is used to invalidate a window or part of it.
BeginPaint
InvalidateRect
EndPaint
DefWindowProc
If bind function fails then what kind of error it will return.
SOCKET_ERROR
SOCKET_FAILED
SOCKET_FAILED
None of the given
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
Which one of the following operations is common to both client and server sockets:
► Bind
► Listen
► Accept
► Send
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
To create semaphore objects which function use by thread?
► CreateSemaphore()
► CreateSemaobject()
► CreateObject()
► Create()
RFC stands for
► Request for comments
► Request of connects
► Reference for connect
► Request for cancels
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
Which one of the following operations is common to both client and server sockets:
► Bind
► Listen
► Accept
► Send
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
To create semaphore objects which function use by thread?
► CreateSemaphore()
► CreateSemaobject()
► CreateObject()
► Create()
RFC stands for
► Request for comments
► Request of connects
► Reference for connect
► Request for cancels
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
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
If the dialog box procedure returns FALSE, then which message handling will be performed?
► Default
► Instance
► Object
► None of the given
How many parameters take the dialog box procedure?
► 1
► 0
► 6
► 4
What does hmenu mean?
► Handle to window
► Handle to the menu
► Handle to child window
► Handle to highest menu
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
If the load menu function fails so what will be the return value.
► 0
► False
► Null <not sure>
► 1
Who generate a unique handle for each menu?
► System
► User
► Dialog box
► Menu Items
Which message function determined where to send message.
► DispatchMessage
► MessageDispatch
► GetMessage
► None of the given
In 32-bit windows programming, we are freed from the curse of 64k segments.
► True
► False
Which function we use to register windows classes in window?
► RegisterClass();
► RegistersClass();
► RegisterWin();
► WinReg();
Which operator manipulates individual bits?
►Bitwise Operators
► Linked Bits
► Individual Bytes
► Linked Bytes
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.
double *ptr is pointer variable which stores double type address.
► True
► False
____________ is/are type(s) of macro.
► Object-like macro
► Function-like macro
► All of the given
► None of the given
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
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
All bits in high word of a 32-bit pointer are ____________.
► Non-zero
► Zero <Not Sure>
► Two
► None of the given
An accelerator _____________ to correspond to a menu command.
► Needs
► Needs not
► Is essential
► Is necessary
CGI stands for:
► Control Graphics Interface
► Common Graphics Interface
► Control Gateway Interface
► Common Gateway Interface
Which one of the following operations is common to both client and server sockets:
► Send
► Connect
► Accept
► Bind
DLU is:
► Handle of a dialog
► Handle of a modal dialog only
► Measure of distance within a dialog box
► Name of a dialog
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
When a menu item is clicked, __________ message is sent.
► WM_MENUITEMCLICKED
► WM_MENUCLICKED
► WM_COMMAND
► WM_PAINT
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
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