(Candidates are allowed additional 15 minutes for only reading the paper. They must not start writing during this time)
Answer all Question in Part I (compulsory) and seven questions from Part II, choosing three questions from Sections A and four questions from
Section B. All working, including rough work, should be done on the same sheet as the rest of the answer. The intended marks for questions or for parts of questions are given in brackets.
Answer all questions.
while answering questions in this part indicate briefly your working reasoning wherever required.
Question 1. 
(a) State the two complement properties of Boolean Algebra. Verify any one of them using the truth table.
(b) Simplify the following Boolean expression starting clearly the laws used for the simplification at each step. x.y + x.z + x.y.z
(c) Find the complement of x.(y'.z' + y.z)
(d) Convert the following product-of-sum from onto its corresponding sum-of-products form:
F(x,y,z) = PI(2,4,6,7)
(e) Draw the truth table of the proportional logic p=>q and p<=>q
(a) Mention two points which distinguish a static data member from an ordinary data member of a class.
(b) Convert the following infix expression to its postfix form.
(c) What do LIFO and FIFO stand for? Name a data structure that follows LIFO principle and one that follows FIFO principle.
(d) A two dimensional array defines as X [3...6,-2...2] requires 2 bytes of storage space for each element. If the array is stored in Row major order, determine the address of X[5,1], Given the base address as 1200.
(e) List the nodes in the Tree given below in.
/ \ \
20 45 80
/ \ / \ / \
10 25 41 50 75 85
|Ans: (i) Preorder 60 40 20 10 25 45 41 50 70 80 75 85|
(ii) Postorder 10 25 20 41 50 45 40 75 85 80 70 60
(iii) Inorder 10 20 25 40 41 45 50 60 70 75 80 85
(a) The following is a function of some class. it returns 1 if the number is a perfect number otherwise it returns 0.
int perfectNo(int n)
(i) What is the expression/value at
(ii) What is the expression/value at ?2? 
(iii) What is the expression/value at ?3? 
(iv) What is the expression/value at ?4? 
(v) What is the expression/value at ?5? 
|Ans: (i) sum=0 (ii) j<n (iii) n%j==0 (iv) +=j; (v) sum==n|
(b) State the final value of q at the end of following program segment:
int show(int n, int f)
if(n%f==0 || n==1)
(i) What will the function show() return when the value of n is 11? 
(ii) What will the function show() return when the value of n is 27? 
(iii) In one line state what the function show() is doing 
|Ans: (i) 1 (ii) 0 (iii) check whether the number is prime or not.|
Answer seven questions in this Part, choosing three questions from Section A and four from Section B.
Answer any three questions.
(a) Given the Boolean function F(A,B,C,D) = E (5,6,7,8,9,10,14)
Use Karnaugh's map to reduce the function F, using the SOP form. Draw a logic gate diagram for the reduced SOP form. You may use gates with more than two inputs. Assume that the variables and their complements are available as inputs. 
Pair 1 is m5+m7
Pair 2 is m6+m14
Pair 3 is m8+m9
Pair 4 is m14+m8
Reduce Expression for Quad 1 is A'D'
Reduce Expression for Quad 1 is A'C
Final SOP expression is A'D'+A'C+AC'D
(b) Given: X(A,B,C,D) = II(2,3,4,5,12,14)
Use Karnaugh's map to reduce this function X using the given POS form. Draw a logic gate diagram for the reduced POS form. You may use gates with more than two inputs. Assume that the variables and their complements are available as inputs. 
Pair 1 is m2+m3
Pair 2 is m4+m5
Pair 2 is m12+m14
Reduce Exp. for Pair 1 is A+B+C'
Reduce Exp. for Pair 2 is A+B'+C
Reduce Exp. for Pair 3 is A'+B'+D
The inaugural function of the newly constructed flyover has been organized by the Public Works Department. Apart from a few special invitees, entry is permitted only if,
* The person is an employee of the PWD of Class I category with more than 10 years of working experience.
* The person is an employee of any other government or authorized private organization either at the managerial level or with more than 10 years of working experience.
The inputs are:
A The person is a Class I employee of PWD
B The person is an employee of any other government or authorized
C: The person has more than 10 years of working experience.
D: The person is holding a managerial post
X- Denotes eligible for entry
[ 1 indicates Yes and 0 indicates No in all cases ]
(a) Draw the truth tables for the inputs and outputs given above and write the Sop expression for X(A,B,C,D). 
The Function value is: R(A,B,C,D)=E(5,6,7,10,11,13,14,15)
The SOP Expression for R(A,B,C,D) is A'BC'D + A'BCD' + A'BCD + AB'CD' + AB'CD + ABC'D + ABCD' + ABCD
(b) Reduce X(A,B,C,D) using Karnaugh's map. Draw the logic gate diagram for the reduced SOP expression for X(A,B,C,D) using AND & OR gates. You may use gates with two or more inputs. Assume that the variables and their complements are available as inputs. 
Quad 1 (m5+m7+m13+m15)
Quad 2 (m6+m7+m14+m15)
Quad 3 (m10+m11+m14+m15)
Simplified Exp. for Quad 1 is BD
Simplified Exp. for Quad 1 is BC
Simplified Exp. for Quad 1 is AC
So final Reduced Expression is BD+BC+AC
a) How XOR gate different from an OR gate? Draw a truth table representing a 3 input XOR operation. Derive its SOP expression and draw the logic gate diagram for the SOP expression. 
b) What is the purpose of a Multiplexer? Mention any two application of Multiplexer. 
c) Draw the logic gate diagram for the following three input function F(x,y,z) using NOR gates only. F(x,y,z)=E(0,1,3,4,7) 
(a) Reduce the following expression usin the laws of Boolean Algebra. Draw the logic gate diagram for the simplified expression. F(A.(A'+B).C.(A+C) 
(b) State the principle of duality. Give the example. 
(c) Convert A.B+B.C' to its canonical SOP form using Boolean Algebra. 
(a) Draw the truth table and logic circuit diagram for a 3x8 decoder. State the difference between a Multiplexer and a decoder. 
(b) Reduce the following Boolean expression to the simplest form: A.[B+C.(A.B+A.C)'] 
(c) Given : F(x,y,z)=E(1,3,7) Prove that F(x,y,z)=II(0,2,4,5,6) 
Answer only four questions. Each program should be written in such a way that it clearly depicts the logic of the problem. This can be achieved by using mnemonic names and comments in the program. (Flow charts and Algorithms are not required).
(The program must by written in C++ OR Java)
NIC institute's resource manager has decided to network the computer resources like printer, storage media, etc, so that minimum resources and maximum sharing could be availed. Accordingly printers are linked to a centralized system and printing jobs are done on a 'first cum first served ' basis only. This is like the first person's printing job will get done first and the next person's job will be done as the next job in the list
and so on. In order to avoid collision, the restriction is that no more than 20 printing jobs can be added.
Define the class Printjob with the following details:
|Data members/instance variable|
|array of integers to hold the printing jobs
to add a new printing job into array
the maximum capacity of the integer array
to point to the index of the front
to point to the index of the last
Constructor to initialize data members capacity=20, front=rear=-1 and call the function createjob()
to create an array to hold the printing jobs.
adds the new printing job to the end of the last printing job, if possible, otherwise displays the message "Printjob is full, cannot add any more".
|void removejob()||Removes the printing job from the front if the printing jiob is not empty, otherwise displays the message "printjob is empty".|
(a) Specify the class Printjob giving details of the constructor and the function void addjob(), void createjob() and void removejob() only. You do not need to write the main function.
(b) What is the common name of the entity described above?
(c) State one of its applications.
A special number is a number in which the sum of the factorial of each digit to the number itself. For example, 145=1!+4!+5!
Desgin a class Special to check if a given number is a special number. Some of the members of the class are given below:
|Data members/instance variables|
|special()||Constructor to assign 0 to n|
|special(int)||parameterized constructor to assign a value to 'n'|
to calculate and display the sum of the first and the last
digit of 'n'
|void isspecial()||check and display if the number 'n' is a special number|
Specify the class special giving the details of the constructor ,void sum() and void isSpecial(). You need not write the main function.
cout<<"Sum of FIRST & LAST Digit : "<<(f+d)<<endl;
cout<<"Number is Special no.";
cout<<"Number is not Special no.";
cout<<"Enter the number : ";
A class collection contains an array of 100 integers. Using the following class description create an array with common elements from two integer arrays. Some of the members of the class are given below:
| integer array
length of the array
|collection(int)||parameterised constructor to assign the length of the array|
|void inparr()||to accept the array|
|collection common(collection)||returns a collection containing the common elements of current collection object and the collection object passed as a parameter|
| void arrange()
|sort the array elements of the object containing common elements in ascending order using any sorting technique|
|void display()||displays the array elements.|
Specify the class collection giving details of the constructor, void inparr() and void arrange(), collection common(collection). You need not write the main function.
A class Employee contains employee details and another class Salary calculates the employees net salary.
The details of the class are given below:
Data members/instance variables
| store the employee no
stores the employee name
stores the employee designation
|Employee(.....)||parameterised constructor to assign value to the employee no, name and designation.|
|void display()||display the employee details.|
Data members/instance variables
|basic||float variable to store the basic pay.|
|Salary(...)||parameterised constructor to assign value to data members.|
|void calculate()||calculate the employee net salary according to the following rules.
DA = 10% of BASIC
HRA = 15% of BASIC
Salary = BASIC + DA + HRA
PF = 8% of Salary
Net Salary = Salary - PF
Display the employee details and net salary.
Specify the class Employee giving the details of constructor and member functions void display() using the concept of inheritance specify the class Salary giving details of constructor and the member functions void calculate(). The main function needs to be written.
Employee(int emno,char epname,char epdes)
cout<<"\n Employee Number : "<<empno;
cout<<"\n Employee Name : "<<empname;
cout<<"\n Employee Desig : "<<empdesig;
class Salary : public Employee
Salary(float bas,char name,char desig,int num) : Employee(num,name,desig)
cout<<"\n Net Salary : "<<Net_sal;
A class revstr defines a recursive function to a reverse a string and check whether it is a palindrome. The details of both the classes are given below:
|Data members/instance variables|
| stores the string
stores the reverse of the string
|void getstr()||to accept string|
|void recreverse(int)||to reverse the string using Recursive technique.|
|void check()||to display the original string, its reverse and whether the string is a palindrome or not.|
Specify the class revstr giving the details of the function void getstr(), void recreverse(int) and void check(). the main function need not be written.
cout<<"Enter a String : ";
void recreverse(int n)
cout<<"Orginal String is : "<<str<<endl;
cout<<"Reverse of String is : "<<revstr<<endl;
cout<<"String is Palindrome";
cout<<"String is not Palindrome";
A class Modify has been defined with the following details:
|Data members/instance variables|
| to store the string
to store the length of the given string
|void read()||to accept the string in Uppercase alphabets|
|void putin(int,char)||to insert the character at the specified position in the string and display the changed string|
|void takeout(int)||to remove the character from the specified position in the string and display the changed string|
to replace each character in the original string by the character which is at a
distance of 2 moves ahead
For example: "ABCD" becomes "CDEF"
"XYZ" becomes "ZAB"
Specify the class Modify giving the details of the void read(), void putin(int,char), void takeout(int) and void change(). The main function need not be written.