1. If you are using C language to implement the heterogeneous linked list, what pointer type
will you use?
2. Minimum number of queues needed to implement the priority queue?
3. What is the type of the algorithm used in solving the 8 Queens problem?
4. In RDBMS, what is the efficient data structure used in the internal storage representation?
5. What are the two classes of hardware building blocks?
6. Expand IDEA.
7. What is wide-mouth frog?
8. What are the typical elements of a process image?
9. What are the key object oriented concepts used by Windows NT?
10. Which containers use a border Layout as their default layout in JAVA?
11. What method is used to specify a container's layout in JAVA?
12. Which java.util classes and interfaces support event handling in JAVA?
13. What is the immediate superclass of the Applet class?
14. Which class is extended by all other classes?
15. What are the primitive operations common to all record management systems?
16. Name the buffer in which all the commands that are typed in are stored in DBMS?
17. What are the unary operations in Relational Algebra?
18. What are the standard predefined macros?
19. At what mode the fault handler executes in UNIX?
20. Is it possible to execute code even after the program exits the main() function. If yes, name
the function which can do this, if no, go to sleep.. :P ?
Answers:
1. We go for void pointer.
2. Two. One queue is used for actual storing of data and another for storing priorities.
3. Backtracking.
4. B+ tree. Because in B+ tree, all the data is stored only in leaf nodes, that makes searching
easier. This corresponds to the records that shall be stored in leaf nodes.
5. Nodes and Links.
6. IDEA stands for International Data Encryption Algorithm.
7. Wide-mouth frog is the simplest known key distribution center (KDC) authentication
protocol.
8. User data: Modifiable part of user space. May include program data, user stack area, and
programs that may be modified.
User program: The instructions to be executed.
System Stack: Each process has one or more LIFO stacks associated with it. Used to
store parameters and calling addresses for procedure and system calls.
Process control Block (PCB): Info needed by the OS to control processes.
9. Encapsulation, Object class and instance.
10. The Window, Frame and Dialog classes use a border layout as their default layout.
11. The setLayout() method is used to specify a container's layout.
12. The EventObject class and the EventListener interface support event processing.
13. Panel.
14. The Object class is extended by all other classes.
15. Addition, deletion and modification.
16. Edit Buffer.
17. PROJECTION and SELECTION.
18. The ANSI C standard defines six predefined macros for use in the C language:
Macro Name
__LINE__
__FILE__
__DATE__
__TIME__
__STDC__
__cplusplus
19. At the Kernel Mode.
20. The standard C library provides a function named atexit() that can be used to
perform "cleanup" operations when your program terminates. You can set up a set
Purpose
-Inserts the current source code line number in your code.
-Inserts the current source code filename in your code.
-Inserts the current date of compilation in your code.
-Inserts the current time of compilation in your code.
-Is set to 1 if you are enforcing strict ANSI C conformity.
-Is defined if you are compiling a C++ program.
of functions you want to perform automatically when your program exits by passing
function pointers to the atexit() function. Here's an example of a program that uses the
atexit() function:
#include <stdio.h>
#include <stdlib.h>
void close_files(void);
void print_registration_message(void);
int main(int, char**);
int main(int argc, char** argv)
{
...
atexit(print_registration_message);
atexit(close_files);
while (rec_count < max_records)
{
process_one_record();
}
exit(0);
}
This example program uses the atexit() function to signify that the close_files() function
and the print_registration_message() function need to be called automatically when
the program exits. When the main() function ends, these two functions will be called
to close the files and print the registration message. There are two things that should
be noted regarding the atexit() function. First, the functions you specify to execute at
program termination must be declared as void functions that take no parameters. Second,
the functions you designate with the atexit() function are stacked in the order in which
they are called with atexit(), and therefore they are executed in a last-in, first-out (LIFO)
method. Keep this information in mind when using the atexit() function. In the preceding
example, the atexit() function is stacked as shown here:
atexit(print_registration_message);
atexit(close_files);
Because the LIFO method is used, the close_files() function will be called first, and then
the print_registration_message() function will be called.
The atexit() function can come in handy when you want to ensure that certain functions
(such as closing your program's data files) are performed before your program terminates.