Part I

Question 1:                                     [1X5=5]

  1. What is the difference between stack and queue?
  2. What is the use of try catch block?
  3. What is recursion technique?
  4. Multiply 111001 by 110                                                
  5. Verify if (A+B)’=A’+B’ with the help of truth table.                  

Question 2:                                     [2X5=10]

  1. Draw a logic circuit for the following booleanexpression      A’+(B.C’+A’C)

2. In an array of real numbers A[10][10], ARR[1][1]is stored in location 450. Find the address of A[2][2] when the array is stores in column major wise & size of each word is 4 bytes.

3. Convert the following into postfix and prefix notation          

A*[(B-C)/(D-E)]Differentiate half adder and full adder.

4. Explain Tautology and contradiction with example.

Question 3:                                         [5]

State the final value of q at the end of the following program segment:


Answer six questions in this part, choosing two questions from Section A, two from Section B and two from Section C.
Section A
Answer any two questions

Question 4:                                             [10]

  1. Explain in detail the motto of FSF Free Software Foundation    [2]
  2. Explain software copy rights?                                 [2]
  3. Explain the following
    1. Privacy                                   [2]
    1. Spam                                      [2]
  4. What is Intellectual property?        [2]

Question 5:                                       [10]

  1. Differentiate half adder and full adder                                       [2]
  2. Explain why NAND and NOR are called universal gate, also draw realizations of AND,OR using NAND & NOR     [5]
  3. What is open soure software?                                     [3]

Question 6:  Convert the following.  [10]

  1. (784)10=(        )2
  2. (322.2)10=(           )2
  3. (430.26)10=(          )8
  4. (DE)16=(         )2
  5. (1101110111)2=(                     )16

Section B
Answer any two 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. The programs must be written in Java.

Question 7:                                          [10]

Write a program according to the class specifications bellow

Class name Number
Data members Intnum
Member functions  
Number(int n) Constructor to assign class members
Int fact(int x) To find factorial of any given number using recursion technique
Boolean isSpecial() To check if the number is special or not

145 is a special number because sum of factorial of each digit of the number is the same number again1!+4!+5!= 1+24+120=145,Also create a main class to call the functions down

Question 8:                                       [10]

Class indexedarray contains the employee code of 100 employees. Some of the members are givenbelow:-
Class name :indexedarray
Data member
arr[] : int array
Member functions
indexedarray() :                  to assign the code to 0.
voidfillarray() :                    to input the code in the arr[].
voidsortarr() :                      to sort the array variable using selection sorttechnique.
intbinarysearch(int[],int) :    to search and return 1 if an employee code is foundin the array object dddddddddddddddddddddotherwise returns 0.
Specify the class indexedarray giving details of the constructor, void sortarr(), intbinarysearch(). Youmay assume that other member functions are written for you. You do not need to write the mainfunction.

Question 9:                                   [10]

Stack is a kind of data structure which can store elements with the restriction that an element can be added or removed from the top only. The details of class Stack are given below:
Class name : Stack
st[] :              the array to hold names.
size :             the maximum capacity of the string array
top :              the index of the topmost element of the stack
ctr :               to count the number of elements of the stack
Member functions
Stack() :       default constructor
Stack(int cap) : constructor to initialize size=cap and top=-1
void pushname(String n) :               to push a name into the stack. If the stack is full, displaythe message “overflow”.
String popname() :                           removes a name from the top of the stack and returnsit. If the stack is empty, display the message“underflow”.
void display() :                                  Display the elements of the stack.

Specify class Stack giving details of the constructors(), void pushname(String n), String
popname() and void display(). The main function and algorithm need not be written.

Section C
Answer any two questions

Question 10:                                               [5]

A class stringop is designed to handle string related operations. Some members of the class are givenbelow:
Date member
txt :                       to store the given string of maximum length 100.
Member function
stringop() :                                   constructor
void readstring() :                        to accept the string
char caseconvert(int, int):           to convert the letter to other case
void circulardecode() :                to decode the string by replacing each letter by converting it
vvvvvvvvvvvvvvvvvvvvvvvvvvvvto opposite case and then by the next character in a circularway. vvvvvvvvvvvvvvvvvvvvvvvvvvvvHence “AbZ” will decode “bCa”.

Specify the class giving details of all member functions. You do not need to write function main().

Question 11:                                        [5]

A class Merger concatenates two positive integers that are greater than 0 and produces a newmerged integer. Example :- If the first number is 23 and the second is 764, then the concatenatednumber will be 23764. Some of the members of the class are given below:
Class name : Merger
Data members
n1 :                        long integer to store first number.
n2 :                        long integer to store second number.
mergNum :            long integer to store the merged number.
Member functions

Merger( ) :                         constructor to initialize data members.
voidreadNum( ) :               to accept the values of the data membersn1 and n2.
Void JoinNum( ) :              to concatenate the numbers n1 and n2 andstore it in mergNum.
void show( ) :                    to display the original numbers and the
sssssssssssssssssssssssmerged numbers with appropriatemessages.
Specify the class Merger, giving details of the constructor, void readNum( ), void JoinNum() and voidshow( ). Define the main function to create an object and call the functions accordingly to enable thetask.

Question 12:                                     [5]

  1. What is the difference between compareTo() and equals() String functions            [2]
  2. Draw truth table for the following Expression.  [3]



Please enter your comment!
Please enter your name here