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 2017 CMSA 3rd Year


   Download the 2017 Hon. Question Paper.

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

FIFTH PAPER - 2017

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) Distinguish between software interrupt and non-muskable interrupt.
(b) Why is data bus bidirectional ?
(c) Mention the differences between JZ and JNZ.
(d) What is DMA ?
(e) What is Bus Arbitration ?
(f) What is the funtion of 8279 ?
(g) What is the differences between opcode and operand ?
(h) What is ROM BIOS ?
(i) What is Client-Server model ?
(j) What is router ?
(k) What is MAC address ?
(l) What is Shannon's capacity ?
(m) What is the difference between bit rate and baud rate ?
(n) What is the difference between guided and unguided media ?
(o) What is E-mail ?

Group - A

2.(a) Discuss the functions of the following signals of 8085 microprocessor : IO/M, INTR, HOLD, WR, ALE and READY. (marks 10)
(b) Explain the requirement of a program counter and stack pointer in 8085 microprocessor. (marks 3)
(c) Draw and explain the timing diagram for the instruction MVlr,data. (marks 3)

3. (a) Classify 8085 instruction in various groups. Give examples for each group. (marks 6)
(b) Explain what operation is performed when the instruction DAA,RAL and RAR are excecuted. (marks 3)
(c) Show interfacing of memory chips of size 2K X 8 using 74138, and explain how to determine memory addressing zone for each memory chip. (marks 7)

4. (a) If the speed of I/O devices do not match the speed of the microprocessor, what type of data transfer techniques are used ? Explain briefly. (marks 6)
(b) Discuss the BSR mode of programmable peripheral interface IC 8255. (marks 6)
(c) Write a set of instructions to check a register pair of 8085 microprocessor for zero content. (marks 4)

Group - B

5. (a) Design a 4-bit combinational circuit decrementer using four full adder circuits. (marks 8)
(b) Is it possible to design a microprocessor without a microprogram ? Explain. (marks 3)
(c) Are all microprogrammed computers also microprocessors ? (marks 2)
(d) What is pipeline processing ? (marks 3)

6. (a) What is the difference between isolated I/O and memory mapped I/O ? What are the advantages and disadvantages of each ? (marks 4 + 4)
(b) Indicate whether the following constitute a control , status or data transfer commands : (marks 2 X 4)
(i) Skip next instruction if flag is set
(ii) Seek a given record on a magnetic disk
(iii) Check if I/O device is ready
(iv) Read interface status register

7. (a) Formulate a hardware procedure for detecting an overflow by comparing the sign of the sum with the signs of the augend and addend. The numbers are in signed 2's complement representation. (marks 8)
(b) Show that adding B after the operation A + B + 1 restores the original value of A. What should be done with the end carry ? (marks 5)
(c) What must the address field of an indexed addressing mode instruction be to make it the same as a register indirect mode imstruction ? (marks 3)

Group - C

8. (a) Describe the functions of Data link and Transport layer. (marks 9)
(b) Describe PAM and PCM with suitable diagram. (marks 7)

9. (a) Distinguish between the bus topology and mesh topology. (marks 6)
(b) Discuss the architecture of TCP/IP model. (marks 4)
(c) What is the purpode of multiplexing ? Difference between FDM and TDM. (marks 6)

10. Write short notes on (any four) : (marks 4 X 4)
(a) Web browser (b) Video Conferencing (c) FTP (d) ADSL (e) DNS (f) URL

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 - 2017

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 inline function in C++ ?
(b) Why copy constructor is needed in C++ ?
(c) Why do we need the preprocessor directive #include<iostream> ?
(d) What do you mean by morphing ?
(e) What composite transformation ? Give an example.
(f) What is frame buffer ?
(g) Differentiate between structure analysis and structured design.
(h) What is the purpose of SRS document ?
(i) What do you mean by mutation testing ?
(j) What is meant by logical data independence ?
(k) Define the integrity rules in relational data model.
(l) Differentiate between inner join and outer join.
(m) What is Lossless join property ?
(n) When decomposition of relation schema R is attribute preserving ?
(o) Differentiate between schema and instances.

Group - A

2. (a) Write a program to overload the + operator to implement addition of two strings in C++.
(marks 5)
(b) Explain working principle of static member function in C++ with an example. (marks 4)
(c) What is the purpose of using virtual destructor ? Explain with proper example. (marks 4)
(d) Explain how to override a function template in C++ by appropriate example. (marks 3)

3. (a) How is polymorphism achieved at compile time and run time ? Discuss each with example. (marks 5)
(b) What is constructor ? Is it mandatory to use constructor in a class ? (marks 4)
(c) When do we make a class virtual ? Explain. (marks 3)
(d) Distinguish between the terms class template and template class. (marks 4)

Group - B

4. (a) What do you understand by the control flow structure of a program ? Why is it difficult to understand a program having messy control flow structure ? (marks 2 + 2)
(b) Why data dictionary is used in a DFD model of a system ? What are the common errors that can happen while constructing a DFD ? (marks 3 + 2)
(c) Which are the major phases in the waterfall model of software development ? Which phase consumes the maximum effort for developing a typical software product ? (marks 3 + 1)
(d) How are the risks associated with a project handled in the spiral model of software development ? (marks 3)

5. (a) Describe the motivation and approaches for integration testing in brief. (marks 6)
(b) What is context diagram in DFD ? Why is it called level 0 DFD ? (marks 2 + 2)
(c) How path coverage testing method is carried out using control flow graph ? Explain with proper example. (marks 6)

Group - C

6. (a) Distinguish between random scan and raster scan display system. (marks 4)
(b) Consider a polygon with four points A(-1,0), B(0,-4), C(2,0), D(0,2). Find the resultant points after reflecting this polygon with respect to the straight line y = x + 5. (marks 6)
(c) Explain working principle of Sutherland-Hodgeman polygon clipping algorithm. (marks 6)

7. (a) Different between parallel projection and perspective projection. (marks 5)
(b) Prove that simultaneous shearing in both directions (x and y) is not equal to the composition of pure shear along the x-axis followed by pure shear along with y axis. (marks 4)
(c) What do you understand by Bezier Curves ? Write four properties of Bezier Curves. (marks 3 + 4)

Group - D

8. (a) Distinguish between procedural and non-procedural DML. (marks 2)
(b) Distinguish between strong and weak entity set with suitable example. (marks 4)
(c) Explain the methods of converting ER diagram containing generalization and specialization to relational model with proper example. (marks 6)
(d) Explain the concept of recursive relationship in ER diagram with suitable example. (marks 4)

9. (a) Distinguish between candidate key and super key with proper example. (marks 4)
(b) Write a short note on secondary index. (marks 4)
(c) Suppose you are given the following requirements for a simple database for the National Hockey League (NHL) :
  • The NHL has many teams.
  • Each team has a name, a city, a coach, a captain and a set of players.
  • Each player belongs to only one team.
  • Each player has a name, a position (such as left wing or goalie), a skill level and a set of injury records.
  • A team captain is also a player.
  • A game is played between two teams [referred to as host-team and guest-team and has a date (such as May 11th, 2016) and a score (such as 4 to 2)]
Construct a clean and concise ER diagram for the NHL database.
List your assumption and clearly indicate the cardinality mapping as well as any role indicators in your ER diagram. (marks 8)

10. (a) Consider the following schema of a relation data base : (marks : 3 + 3)
EMPLOYEE (EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, DEPTNO)
DEPARTMENT (DEPTNO, DNAME, LOC)
Give an expression in specified languages for each of the queries given below :
  1. Find names and salary of those employees who get maximum salary (Relational Algebra) [without using aggregation function]
  2. Find number of employees under each manager in ascending order (SQL)

(b) Distinguish between tuple and domain relational calculus with proper example. (marks : 4)
(c) When a relation is said to be in first normal form (1NF) ? Explain how 1NF normalized relation can be obtained from an un-normalized relation with example. (marks : 2 + 4)

11. (a) Consider the relation :
BOOK (book_title, author_name, book_type, list_price, author_affiliation, publisher) and the set of functional dependencies :
book_title->publisher, book_type
book_type->list_price
author_name->author_affiliation
Find the key of BOOK. Decompose BOOK into 2NF and then 3NF relations. (marks : 2 + 3 + 3)
(b) Find a minimal cover for the following set of functional dependencies
F = {A  ->  C,  AC  ->  D,  E  ->  AD,  E  ->  H}. Clearly show all the necessary steps with proper explanations. (marks 8)

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 ( "