Beruflich Dokumente
Kultur Dokumente
(Model Paper)
• The assessment of your performance on the exam will be based on the extent to
which your answers are: precise, concise and exemplified.
SECTION – A MARKS:
3. Select the correct answer after the following piece of code is executed [2 Marks]
Private Sub s_temp()
Dim frm_new As frm_main ' frm_main is an existing form
Dim frm_temp As frm_main
frm_temp.Show
End Sub
(a) Two instances of frm_main are in memory referred by frm_main and frm_temp respectively.
(b) The code will generate a run-time error when frm_temp.show is executed.
(c) There is one instance of frm_main in memory and it is referred by both frm_main and
frm_temp
(d) None of the above
4. When multiple instances of a form exist, which of the following is false [1 Mark]
(a) 'Me' keyword always refers to the instance in which the code is currently running
(b) Each instance has its own copy of the data for the form.
(c) All instances share the same set of procedures.
(d) None of the above.
1. Write a C function that accepts 3 strings a,b,c. If a occurs in c then its position is returned along
with the replacement of first occurrence of a by b. [3 Mark]
For example: If strings passed are a=”cat”, b=”dog”, c=”concatenate” then the function should
return 4, and c should be set to the value “condogenate”.
2. What will be the effect of using the following statements in VB6 [2 Mark]
a) Dim i, j as integer
b) Dim k=45
(Note: This question checks for understanding of different data types in VB6 and different ways of using the
declaration.)
3. Demonstrate a way to load a DLL using implicit load time linking versus run time linking
and contrast the differences. Write an appropriate windows program. [3 Mark]
1. Many organizations have a grade-based salary system. At the time of annual increment, an employees
salary is increased based on the promotion s/he gets.
Write a ProC program which asks user to enter the intEMP_ID. It then displays intEMP_ID,
txtEMP_NAME, role and his/her department name as its result.
The program should also ask the employee to enter his emp_id in the start of execution. If his role is
ADMIN (other role is 'USER'), he should be able to see all the details about the employee and change the
grade of the employee. The possible grades for the employee are A, B, C and D where A is the highest
grade.
If an ADMIN changes the grade, then a stored procedure should be called to change the salary of the
employee based on the grade as follows.
- If grade is increased by 3 then salary is increased by 40%
- If grade is increased by 2 then salary is increased by 30%
- If grade is increased by 1 then salary is increased by 20%
- If grade is unchanged then salary is increased by 10%
(Note: This question checks the ability to write a C program, which embeds SQL and invokes a stored
procedure.)
2. Often there are multiple instances of a same process running. Sometimes it is required to terminate all
such processes. Write a shell program killprog that kills all processes that are instances of a specified
program. For example, if multiple instances of the program a.out is running, the following command
line should kill all instances of it.
$ killprog a.out
The program killprog should attempt to kill only processes that are owned by the current user and should be
immune signals such as interrupt, hangup and kill. Finally it should print the number of processes that
were killed.
(Note: This question checks for the ability to write Korn shell scripts using features such as filtering
commands, “trap” etc. to control signals. Korn shell is most widely used in the projects.)