0% found this document useful (0 votes)
121 views16 pages

CPDS Pyq

This document is the question paper for the 1st semester B.Tech examination in 2019 for the subject CPDS (Computer Programming and Data Structures). It contains 8 questions to be answered in 3 hours. The questions are of equal value and cover topics related to C programming language and data structures such as loops, functions, arrays, pointers, structures, classes and objects. Students are required to answer the questions in their own words as far as practicable.

Uploaded by

Sunny Rana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
121 views16 pages

CPDS Pyq

This document is the question paper for the 1st semester B.Tech examination in 2019 for the subject CPDS (Computer Programming and Data Structures). It contains 8 questions to be answered in 3 hours. The questions are of equal value and cover topics related to C programming language and data structures such as loops, functions, arrays, pointers, structures, classes and objects. Students are required to answer the questions in their own words as far as practicable.

Uploaded by

Sunny Rana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

C41T

Total Pages- 4
UL(1)-CPDS

B.Tech. 1st Semester Examination, 2019(New)(A)


CPDS

Full Marks 70
Time: 3 hours
Answer any five questions
The figures in the right-hand margin indicate marks
Candidates are required to give their answers in their
own words as far as
practicable

1. (a) Discuss the main difference between while


and do-while loop. 2

(b) Write a program to print all prime no's in a


given range. 6

(c) Write a program to add first n natural


numbers. 6

2. (a) What is function ? Discuss the types in terms


of return types and arguments. 7

(Turn Over)
2

(b) How can we pass an array to a function ?


Give suitable example.
3 a) Write a program to copy the content OI
one file to another. 1

(6) Compare the structure of switch case with


nested if else structure with suitable example. 7
.

4. (a) How is pointer variable declared ?


Mention
the arithmetic operations that can be
performed on a pointer variable. 1
(6).Write a
program to define a structure
student' that will contain the roll
name and total marks
number,
ofa student, then it
will ask the user to input details of 6 students
and print
the details of. all the
students
whose total marks is greater than
value.
a
given
1
.

5. (a) Explain the evolution of computers. Further,


State how computers in one generation are
better than their
predecessors.i.

UL(1)-CPDS
(Continued)
,

3)

(b) What is operator ? Explain


different type of
7
operators available in "C".

6. (a) Explain pointer to an array and array to


7
pointers with the help of example.

(b) Write a program to multiply any two 3 x3


matrices. 7

7. (a) What is the importance of Inheritance in


OOP 2 Explain the different types of
Inheritance with the help of suitable
diagrams. 1

(b) Explain the visibility modes of data member:


public', 'private' and 'protected' with
example. 1

8. (a) Define class and object. 2

(b) Write short notes on following term (any


six) 12
() Stack
(ii) Queue

UL(1)-CPDS (Turn Over)


4

(iii) Linked List


(iv) Tree

(v) Graph
(vi) goto
(vii) Identifier
(vii) Constructor.

UL(1)-CPDS
Hz-3,500
UL (2-CPDS

2019 (New) (A)

Full Marks: 70
Time:3 hours
Answer any five questions.
The figures in the right-hand margin indicate marks.
Candidates are required to give their answers in their
own words asfar as practicable.

1. (a) What is the importance of keywords in C?


Specify thee advantages of functions. 7

(b) Write a C program to sort an integer type


array using pointer. 1

2. (a) Discuss the basic data types in C.

(6) Draw a flowchart to check whether the


given number is zero, positive or negative. 7

7
3. (a) Explain the basic organization of a computer.
7
(6) Write a Cprogram for the following series:
1+2+3+4+.+N
(Turn Over)
2

4.(a)Write a C program to count the number of


words in a string using pointers. 1
(6) Describe about
example.
pre-processor with suitable
5. (a) List out the areas in which data
are applied structures
extensively ? What are the limita-
tions of arrays ? How
can you overcome the
limitations of arrays.?
(6) Write a C program to allocate
dynamically for strings, and store memory
addresses in array of their
pointers to strings. 7
6. (a) Define object oriented programming. What
is the difference between a
reference ? pointer. and
7

(b) Explain the characteristics


of OOPs in detail. (features/concepts)
7
7. (a) What is destructor ? When will be the
destructor called ? 7

(6) Explain in detail about class, objects, me-


thods, and messages. 7

UL2-CPDS (Continued)
3

8. Write short notes on any wo of the following:


7 x2
(a) Storage classes

(t) 1-dimentional and 2-dimentional arrays

(c) Linked Lists

(d) Tree.

UL(2)-CPDS Hz-800
UL(1)-CPDS
2018 (New) (A)
Full Marks : 70

Time: 3 hours

Answer any five questions.

The questions are ofequal value.

Candidates are required to give their answers in their


own words as far as practicable.

1. (a) Draw the block diagram of a computer and


discuss the working of all the components:

(6) Briefly explain the evolution of computers


through the different generations.

2. (a) Describe all the Assignment Operators in C?


Write a simple program that demonstrates thee
usage of all those operators.

What is the use of a Loop Statement ? Using


(b)
do-while loop, write a program to add num-
bers until user enters zero.

3. (a) Explain the different parts of a function defi-


(Turn Over)
2
nition. Write a program to check
whether a
number canbe expressed as the sum of two
prime numbers.

(6) What do you mean by Storage Class ? Ex-


plain the basic storage classes that are used
in C Language.

4. (a) What are the rules to declare 1D array ? Write


a
program to input 10 numbers in an array
and print the sum of only those whose tenth
place digit is divisible by 2.
(b) How is a structure different from an array ?
Write a program to show how the members
of a structure are accessed.
5. (a) What are the advantages of using a
Write a
pointer ?
program to search an element in an
array using pointer.
(b) What are Function Pointers ? Write a
to show how you can use a
programn
pointer to call a
function.
6. (a) What are the different modes in which a file
can be opened in C?
Briefly describe each.
mode.

UL(1 CPDS
(Continued)
3

(6) Writea program to append the content ofone


file at the end of another file.

7. (a) Compare and contrast between Structured


Programming and Object Oriented' Program
ming. Give examples wherever necessary.

(b) What is the importance of Inheritance in


0OP ? Explain the different types of Inherit-
ance with the help of suitable diagrams.

8. Write short notes cn the


foilowing:
(a) Doubiy Linked List

(b) Circular Queue

ULI CPDS
HZ-1500
A C A E C

UL(2)-Comp. Prog. & Data. Str.


2018 (A)
Full Marks: 70 TUNE
Time 3 hours
Answer any five
qucstions.
The figres in the
right-hand margin indicate marks.
Candidates are required to give their
answers in their
own words as far as practicable.

1. (a) Differentiate and exemplify primary


and secondary memory. memory

(6) What is the significance of different types of


programming languages ? Explain them with
examples. 7

2. (a)Describe the data types usd in programming


languages. Describe the significance of rela-
tional opecrators in C programming
language. 7

(6) What is an Array ? How does array differ from


Structure ? Explain with example. 7

(Turn Over)
2 )

an
Recursion? Write
mean by inte
3. (a) What do you
calculate the
GCD of two
7
algorithm to
gers using Recursion.

Net-
Computer
the advantages of
(6) What are
types o f
works ? Describe the different 1
Computer Networks.

two matrices
4. (a) Write a program in Cto multiply mairix. 1
x 3). Display the product
of order (3
of ope-
(6) Explain precedence and associatively 1
rators with suitable examples.

5. (a) Whatis an unsigned integer constant? What is


the significance of declaring a constant as un-
signed ? Write a program in C to swap two
numbers using pointers. 1

(6) What is storage class ? Explain them with


suitable example for each. 7

6. (a) Write a program in C to find the sum of the


all integers ranging from 100 to 200 and di-
visible by both 2 and 3. 1

UL2-C.P.&D.S (Contimuecd
3

(6) Write down a function to merge two linked


lists containing same type of information in
ascending order into a sorted single linke list. 7

7. (a)Write a function, using pointer parameter,


that reverses the elements of a givenarray.

(6) Write aC Program to check whether the string


taken as input is palindrome or not. Display
appropriate message.

8. Write shortnotes on any two ofthe following:7 x 2

(a) Multi Processing

(6) Application Software

(c) ASCII and EBCDIC coding scheme

(d) Circular Queue.

Ilz-1.800
COPYRIGHT RESERVED VBTech(1)- Comp.
Prog. &Data Str.

2017(A)
Time: 3 hours

Full Marks: 70

Candidates are required to give their arswers in


their own words as far as practicable.

in the margin indicate ful marks.


The figures
Answer any five questions.

1. (a) Describe the different types of peripheral


7
devices used in computer systems.
along with
(b) Explain computer generations,
each generations.
the key characteristics in
7

Draw a flow chart and write a Program Cto


in
2 (a)
calculate the maximum of three numbers.
7

(b) What are time sharing operating systems?


Explain their characteristics 7

OW-6/2 (Turn over)


3. (a) Write a program in C to sort an array of 20

integers in descending order. 7

(b) What are the advantages of E-mail ?


Describe the different protocols used in
E-mail. A

(a) What are the significance of Error handling


during /O Operations in C Programming
Language ? Explain. 7

(b) What are the different types of contro!


Statements and looping constructs used in
C Programming Language ? Explain each
one with example. 7

5. (a) Write a program that uses a function pointer


as a function Argument.
(b) List out the roles of different registers in the
CPU. Name them with their functions. 7

6. (a) Write a program to illustrate the use of


indirection operator * to access the valuess

pointed to by a pointe 7

(b) Write a program to copy the contents of one


file into another. 7

OW-6/2 (2) Contd


(a) Write a program to implement STACK and
describe all the operations of STACK.
7
(b) Using structure write a program to add two
complex number.

3. Write short notes on any two of the following


7x2 14
(a) Linked List
(b) System Software
(c) Structure
(d) Remote logging
(e) Constructor

OW-6/2 (3,000) (3) VBTech(1)-Comp.


Prog.&Data Str.

You might also like