Sie sind auf Seite 1von 4

Open System Stream Exam

(Model Paper)

Instructions to the candidates:

• Please read all the instructions.

• Please do not write anything on the question paper.

• Maximum time allowed for the entire test is 3 hours.

• There are three sections in the exam paper.

• Each section has different weight-age.

• Marks for a given question are indicated against it.

• The exam is closed book, closed material.

• Please surrender the question paper once you have completed.

• 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:

1. Which of the following is true [1 Mark]


(a) You can dynamically increase the no. of elements in a control array not so in an array of
controls.
(b) You can dynamically increase the no. of elements in an array of controls not so in a control
array
(c) You can dynamically increase the no. of elements in both
(d) You cannot dynamically increase the no. of elements in either.

2. If a file does not have write permission for a user, [1 Mark]


(a) He can delete the file
(b) He cannot read the file
(c) He cannot copy the file
(d) He cannot change its ownership

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

Set frm_new = New frm_main


Set frm_temp = frm_new

Set frm_new = Nothing

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.

5. Here goes next question …..


SECTION – B MARKS:

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”.

(Note: This question checks for string operations in C)

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]

(Note: This question checks for different forms of usage of DLLs)

4. Here goes next question …


SECTION – C MARKS:

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.

A database has following structure:

Table Name: EMPLOYEE

Column Names: intEMP_ID, txtEMP_NAME, txtEMP_ROLE, intEMP_DEPT, intEMP_GRADE,


intEMP_SALARY

Table Name: DEPARTMENT


Column Names: intDEPT_ID, txtDEPT_NAME

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.)

Das könnte Ihnen auch gefallen