Identifier is not replaced if it appears
► In a comment
► With in a string
► As a part of a long identifier
► All of given
__________ macro expands to the constant 1, to signify that this compiler conforms to ISO standard C. 42
► _STD_
► _STDC_
► _STDC_
HOSTED_
GDI presents a ?
• device-independent view
• device-dependent view
Widow operating system do not do
• Direct memory access
• Direct access video port
• Direct memory interrupt (I thins this is correct but not sure )
• None of the above
None of the above
char * const ptr = buff.
• constant pointer to variable data• variable pointer poit to the constant pointer
Command line argument pass the arg variable ……………………function in the program
• Main(not sure)
• Window
• Virtual
• None of the above
GDI is a subsystem responsible for displaying text and images on display devices and printers
True
False
Types of Subclassing 2 marks
Solution
Instance and globle
What are assertion types? 3 marks
Solution
Preconditions
• Specify conditions at the start of a function.
Post conditions
• Specify conditions at the end of a function.
Invariants
• Specify conditions over a defined region of a program.
what is the pre processor directories. 3 marks
Preprocessor
The preprocessor is a program that runs prior to compilation and potentially modifies a source code file. It may add code in response to the #include directive, conditionally include code in response to #if, #ifdef, #ifndef directives or define constants using the #define directive.
As defined by the ANSI standard, the C preprocessor contains the following directives:
#if #ifdef #ifndef #else #elif #include #define #undef #line #error #pragma
Preprocessor directives: #ifdef and #ifndef
The #ifdef (if defined) and #ifndef (if not defined) preprocessor commands are used to test if a preprocessor variable has been "defined".
Role of Kernel OS 5 marks
Solution
Kernel is a main module of the operating system. This provides system services for managing threads, memory, and resources.
Kernel has to perform very important responsibilities e.g.
1. Process Management
2. File Management
3. Memory Management (System and Virtual Memory)
In Windows Operating System Kernel is implemented in the form of Kernel32.dll file.
The Kernel is responsible for scheduling and synchronizing threads, processing, exception and interrupts. Loading applications and managing memory. Kernel is responsible for the system stability and efficiency
When an application subclasses a window, it can take three actions with the
Message ? 5 marks
When an application subclasses a window, it can take three actions with the
message: (1) pass the message to the original window procedure; (2) modify the message and pass it to the original window procedure; (3) not pass the message.
The application subclassing a window can decide when to react to the messages it receives. The application can process the message before, after, or both before and after passing the message to the original window procedure.
At least write two task of GDI Perform ? 2 marks
Solurion
GDI is a subsystem responsible for displaying text and images on display devices and printers
Three condition of sending WM_Paint.message 3 marks
Condition in which PAINT message is sent (briefly)
• Any hidden part of window becomes visible Window is resized (and CS_VREDRAW, CS_HREDRAW style bits were set while registering the window class).
• Program scrolls its window.
• InvalidateRect or InvalidateRgn is called by the application.