Skip to main content

C programs QnA

Q. If sum of two integer is 14 and if one of them is 8 then find other integer. Ans: Well, this is very simple. Simply, one integer is 8 and sum of two integers is 14. So, we need to subtract the number 8 from their sum of 14 to get the second number. So, the second number is: 14 - 8 = 6 C-Program of this task Code---> #include<stdio.h> int main () { int num1 = 8 , num2 , sum = 14 ; num2 = sum - num1 ; printf ( "The second number is: %d" , num2 ); return 0 ; }

CU Question Paper 2016 CMSA 3rd Year


   Download the 2016 Hon. Question Paper.

COMPUTER SCIENCE - HONOURS [Part - III : 3rd Year]

FIFTH PAPER - 2016

Full Marks - 100


Answer Question No. 1 and any five questions from the rest taking at least one from each group

1. Answer any ten questions : (marks: 2 X 10)
(a) What is synchronous and dynamic random access memory(SDRAM) ?
(b) What are different types of maskable interrupt ?
(c) Compare the operation of HTTP and FTP.
(d) What is 'handshaking' operation in microprocessor based system ?
(e) How are T lines related to DS service ?
(f) What is CDMA ?
(g) What do you mean by Cache coherency problem ?
(h) Highlight the main advantages of mesh topology ?
(i) What is interlaced raster scanning ?
(j) State the differences between FDM and PCM?
(k) State the functions of ALE.
(l) What do you mean by instruction cycle and machine cycle ?
(m) How many memory locations can be addressed by a microprocessor with 14 address lines ?
(n) What do you understand by domain name ?
(o) What is Hub ? What are their types ?

Group - A

2.(a) Assume that the accumulator (A) contains 08 and register B contains 93(both in BCD format). Find the contents of the accumulator after ADDB instruction is excecuted.
Is the result a valid BCD number ? If not, what should be done to obtain the result in BCD format ? Explain clearly. (marks: 6)
(b) How many status flags are there in 8085 microprocessor ? What will be status of different flags if microprocessor adds E9 and A8 ? (marks: 1 + 4)
(c) What is DMA transfer ? Where it is used ? Explain burst mode and cycle stealing techniques of DMA data transfer. (marks: 5)

3. (a) Draw an Instruction Cycle State Diagram with an interrupt.
Illustrate a typical bus structure of a 8085 system. (marks: 3 + 3)
(b) Explain how we allow multiple devices to interrupt using INTR line. (marks: 5)
(c) Briefly outline the memory hierarchy and state its necessity. (marks: 5)

4. (a) Differentiate between Hardware and Software interrupt. (marks: 2)
(b) Explain with example when I/O mapped I/O is used and when memory mapped I/O is used. (marks: 6)
(c) Explain the instructions PCHL and JMP 8000H. Do the instructions perform same operation ? Justify your answer. (marks: 2 + 2)
(d) Explain the operation of the following Assembly language program for Microprocessor 8085. Show all the steps and register contents after excecution of each instruction. (marks: 4)
MVI A,32H
LXIH 8000H
MOV M,A
MVI B,80H
XRA A
MOV C,A
STAX B
HLT

Group - B

5. (a) Given the 16-bit value 1001101011001101. What operations must be performed in order to: (marks: 6)
  1. clear to 0 the first eight bits ?
  2. set to 1 the last eight bits ?
  3. complement the middle eight bits ?

(b) Derive the control gates for the write input of the memory in the basic computer. (marks: 5)
(c) Register A contains a and register B contains b. Write an assembly language program to mutually exchange the contents of A and B without using any additional register or memory location. (marks: 5)

6. (a) Show the hardware to be used for the addition and subtraction of two decimal numbers in signed magnitude representation. Indicate how an overflow is detected. Derive the flowchart algorithm. (marks: 6 + 2)
(b) Derive an algorithm for evaluating the square root of a binary fixed-point number. (marks: 5)
(c) What are the functions of co-processor ? (marks: 3)

7. (a) What do you mean by microprogrammed control unit ? Design the micro programmed control unit and explain its operation. (marks: 2 + 4)
(b) Compare Horizontal and Vertical micro-instruction. Show their encoding to control signals. (marks: 4)
(c) Explain and show the organization of 64K X 8 memory module using 16K X 1 static memory chips(Show CS, R/W, Control lines, Address and data bus). (marks: 6)

Group - C

8. (a) How many layers are there in OSI model ? Say in brief the functions of each layer. (marks: 2 + 7)
(b) How does FDM combine multiple signals into one ? (marks: 4)
(c) What are bit rate and baud rate ? (marks: 3)

9. (a) What is the difference between primary server and secondary server ? (marks: 3)
(b) What is domain name ? What are the three domains of the domain name space ? (marks: 2 + 3)
(c) What is a uniform resource locator ? What are its components ? (marks: 2 + 2)
(d) What is null modem ? (marks: 2)
(e) How is HTTP related to www ? (marks: 2)

10. Write short notes on (any four) : (marks: 4 X 4)
(a) TCP/IP (b) MAC (c) Browsing (d) Telnet (e) ISDN (f) ISP

Download the Document file of this Question Paper.

Don't just read, run on your pc !!!


COMPUTER SCIENCE - HONOURS [Part - III : 3rd Year]

SIXTH PAPER - 2016

Full Marks - 100


Answer Question No. 1 and any five questions from the rest taking at least one from each group

1. Answer any ten questions : (marks: 2 X 10)
(a) What do you mean by Default Arguements ?
(b) Define this pointer in C++.
(c) What is an abstract class ?
(d) What is the purpose of using scope resolution operator ?
(e) State the difference between viewport and a window.
(f) Differentiate between raster and vector graphics.
(g) What is convex hull of a set of points ?
(h) Why is level 0 DFD called context diagram ?
(i) Which is a stronger testing : data flow testing or path testing ? Justify.
(j) Why is spiral model called meta model ?
(k) What are various types of software maintenance techniques.
(l) Differentiate between physical and logical data independence.
(m) Define super key and foreign key.
(n) What is recursive relationship in an ER model ?
(o) When is decomposition of relation schema R called dependency preserving ?

Group - A

2. (a) Why is bottom-up designing methodology suitable in object oriented programming ?
(marks: 4)
(b) Distinguish between multiple and hierarchical inheritence. (marks: 3)
(c) Why cannot constructors be made virtual in C++ ? (marks: 3)
(d) Explain the concept of class templates in C++ by appropriate example. (marks: 6)

3. (a) What is a friend function ? Mention some characteristics of a friend function. (marks: 2 + 4)
(b) Explain the working principle of virtual function virtual pointer (marks: 4)
(c) Explain the concept of exception handling in C++ by appropriate example. (marks: 6)

Group - B

4. (a) What do you mean by V-model in SDLC ? (marks: 3)
(b) What are the advantages and disadvantages of using iterative waterfall model ? (marks: 5)
(c) Explain with an example how a DFD model can be transformed into structure chart. (marks: 8)

5. (a) What are the main activities involved in testing ? What is a minimal test suite ? (marks: 2 + 4)
(b) A software is used to compute the square root of an input integer that can assume values in the range of 50 and 500. Determine the test suite using a black box testing approach. (marks: 3)
(c) Explain two software quality matrics : Robustness and Reusability. (marks: 5)
(d) Write in brief about the role of system analyst. (marks: 2)

Group - C

6. (a) Show that a 2D reflection through X-axis followed by a 2D reflection through the line y = -x is equivalent to pure rotation about the origin. (marks: 6)
(b) A cube with unit dimension is placed at origin in first octant. Reflect it with respect to plane Z = 0. Then perform 500% scaling. Find the transformation matrix which can be generate the target object. (marks: 6)
(c) Discuss briefly about the different types of perspective projections. (marks: 4)

7. (a) Discuss Bresenham's algorithmfor line drawing. Explain why this algorithm is preferred over DDA and midpoint for line drawing. (marks: 5 + 3)
(b) Write down the reflection matrix about XY plane and YZ plane is 3D-transformation. (marks: 2 + 2)
(c) Differentiate between interior clipping and exterior clipping. (marks: 4)

Group - D

8. (a) Discuss the basic relational operators in DBMS in brief ? How can the intersection operation be expressed through basic operators ? (marks: 4 + 2)
(b) What is the disadvantage of using indexed-sequential file organization ? (marks: 3)
(c) Why are null values introduced in database ? (marks: 3)
(d) "SQL is relationally complete" - Justify. (marks: 4)

9. (a) Explain left outer join and right outer join with example. (marks: 4)
(b) Why BCNF stronger than 3NF. (marks: 3)
(c) Illustrate with suitable example how insertion and deletion are done in hashed file organization (marks: 6)
(d) How can division operation be expressed using fundamental operations of Relational Algebra ? (marks: 3)

10. (a) Consider the following relational schema with keys underlined : (marks : 3 + 3 + 3)
CUSTOMERS (cid, cname, city, discount)
AGENTS (aid, aname, city, percent)
PRODUCTS (pid, pname, city, quality, price)
ORDERS (ordno, month, cid, aid, pid, qty, rupees)
Give an expression in specified languages for each of the queries given below :
  1. Get the aid's and aname's of agents with aname beginning with the letter N who do not place orders for any product in Patna. (SQL)
  2. Get names of agents who place orders for all products ordered by customer C003. (relational algebra)
  3. Get product names ordered by at least one customer based in Bangalore through an agent based in Mumbai. (relational Calculus)

(b) Explain the concepts of generalization, specialization and aggregation in ER data model with proper examples. (marks : 7)

11. (a) Consider the relation R = {A,B,C,D,E,F,G,H,I} and the set of funtional dependencies :
F = { {A,B} -> {C}, {B,D} -> {E,F}, {A,D} -> {G,H}, {A} -> {I}, {H} -> {J} }
Find the key of R. Decompose R into 2NF and then 3NF relations. (marks : 4 + 2 + 2)
(b) When are two sets of funtional dependencies said to be equivalent ? Give example. (marks: 3 + 2)
(c) Why are Armstrong's inference rules said to be sound and complete ? (marks: 3)

Download the Document file of this Question Paper.

Don't just read, run on your pc !!!


Comments

Popular posts from this blog

C-program of printing "Hello World", 10 times on the screen.

In this C program we will print "Hello World", 10 times on the screen. We will use "body-less-loop" for this C-Program. "Body-less-loop" : it means that the inner part(code block to be executed) of the loop will be empty and the loop will have a semi-colon(;) in it's end. i.e: for ( .....  ; .....  ; .....  ) ; input: Null. output: "Hello World" will be printed on the screen, 10 times. CODE----> #include<stdio.h> int main() {      int i;      for( i=1 ; i<=10 ;printf( "   Hello World ! \n ", i++ )) ;      return 0 ; } Don't just read, write it, run it..... RESULT :

Calculate sum of 5 numbers using Array in C-language

In this C -program we will scan the numbers using array and then we will calculate the sum of the given numbers, also using array. The numbers will be taken from the user. input: 5 numbers.(i.e : 5,6,9,56,548) output: The sum of the given numbers will be printed on the screen. CODE----> #include<stdio.h> #include<stdlib.h> main() { int arr[5],i,sum=0; printf ("       Enter Five numbers : "); for ( i=0 ; i<5 ; i++ ) {       scanf (" %d ",&arr[i]); } for ( i=0 ; i<5 ; i++ ) {      sum=sum+arr[i]; } printf (" \n      The sum of the given 5 numbers is : %d\n ",sum); system (" pause "); } Don't just read, write it, run it..... RESULT :

Linear Queue Program in C-Language

In this C program we will perform operations over Linear Queue ( i.e: Data insert Operation, Data remove Operation and display Operation ). The Choice( i.e: data insert,remove or display ) will be made by the user and The Number will be taken from the user( i.e: For Data insert Operation ). input: The Choice(i.e Data insert, remove or display) & The Number (integers) (i.e. for Data insert Operations) (15,10,128 etc.) output: The Operations will be excecuted as choosen by the user. CODE----> #include<stdio.h> #include<stdlib.h> #define MAXSIZE 10 int Q [ MAXSIZE ], front =- 1 , rear =- 1 ; void qinsert ( int x ) { if ( rear == MAXSIZE - 1 ) printf ( "\n Queue is Full." ); else if ( front ==- 1 ) { front = 0 ; rear = 0 ; Q [ front ]= x ; } else { rear ++; Q [ rear ]= x ; } } void qdelete () { if ( front ==- 1 ) printf ( "\n Queue is Empty." ); else if ( front == rear ) { printf ( "