Download VTU B-Tech/B.E 2019 June-July 1st And 2nd Semester 17 Scheme 17PCD13 Programming in C and Data Structures Question Paper

Download VTU ((Visvesvaraya Technological University) B.E/B-Tech 2019 July ( Bachelor of Engineering) First & Second Semester (1st Semester & 2nd Semester) 17 Scheme 17PCD13 Programming in C and Data Structures Question Paper

17PCD13/23
First/Second Semester B.E. Degree Examination, June/July 2019
Programming in C and Data Structures
Time: 3 hrs. Max. Marks: 100
Note: Answer any FIVE full questions, choosing ONE full question from each module.
*.
-
L
.

.
Module-1
E 1 a. Design a general structure of C program and explain with an example. (06 Marks)
74
,- - b. What are Identifiers? Define rules to declare an identifier. Identify the following words are
ct
-
valid / Invalid Identifier : i) asdl23 ii) auto iii) 2K18 iv) (i
-
i india. (06 Marks)
0.)
c. Design a flow chart and develop a C - program to find area of a circle for the given radius.
.:=
(08 Marks)
)
.._...4 T
.
.
;

OR
,.. -
g d
2 a. Explain the formatted input and output statements in C with suitable examples. (06 Marks)
76
1-r
'
II
.s.L. c.
b. With example, explain Implicit and Explicit type conversion and convert the following
Mathematical Expression to C - equivalent Expression.
Tzi 7
?
1-
E
?
4
ii)
x
Y
i) area = VS(s - a)(s - b)(s - c) + .
a.) p
( 08 Marks)
5 ' a + b a b
,-.E
5 c. Write a C program to find largest of three numbers using ternary operator. (06 Marks)
..- 0
? ._
.
Module-2
. ,
O E
3
. -4
Q
?
0 3 a. Explain the following selection statements with syntax and flow chart :
,.
et 0
i) nested if ii) else - ifladder.
-0
(06 Marks)
ao .c
,

,3 m b. With example bring out the differences between while loop and do - while loop. (06 Marks)
.
..6. ,.
o C. Design a C program to perform operations of a simple calculator using switch statement.
, .-?
O z
Provide a provision to display an error message when an attempt is made to divide a number
?, ,;
by zero. (08 Marks)
c
0

v
OR
----- ci,
o cl
? 4 a. Explain the working of for loop and write a C - program to find n - Fibonacci series, where
?t''' . 0
4- .) n is specified by the user. (08 Marks)
3 0
tz"-
b. Explain the following unconditional statements with syntax and example :
i... ,...,
i) goto ii) continue. (06 Marks)
= -
c
t
? ?
>, =4-
c. Design a C - program to read a Four - digit number from user and calculate the reverse of
to
the number and check if the number is palindrome or not. (06 Marks)
7
8
.

? F.
5 ' >
o E-.',
Module-3
o
(5
,
5 a. De fine Array. Explain the methods of initializing one dimensional array with suitable
-
,
t
,i examples. (06 Marks)
u b. What are Functions? Explain the following terms with example.
0
z i) Function declaration ii) Function definition iii) Function call. (08 Marks)
c. What is Recursion? Write a C program to find factorial of the given number using recursion.
a
(06 Marks)
F. --
OR
FirstRanker.com - FirstRanker's Choice
17PCD13/23
First/Second Semester B.E. Degree Examination, June/July 2019
Programming in C and Data Structures
Time: 3 hrs. Max. Marks: 100
Note: Answer any FIVE full questions, choosing ONE full question from each module.
*.
-
L
.

.
Module-1
E 1 a. Design a general structure of C program and explain with an example. (06 Marks)
74
,- - b. What are Identifiers? Define rules to declare an identifier. Identify the following words are
ct
-
valid / Invalid Identifier : i) asdl23 ii) auto iii) 2K18 iv) (i
-
i india. (06 Marks)
0.)
c. Design a flow chart and develop a C - program to find area of a circle for the given radius.
.:=
(08 Marks)
)
.._...4 T
.
.
;

OR
,.. -
g d
2 a. Explain the formatted input and output statements in C with suitable examples. (06 Marks)
76
1-r
'
II
.s.L. c.
b. With example, explain Implicit and Explicit type conversion and convert the following
Mathematical Expression to C - equivalent Expression.
Tzi 7
?
1-
E
?
4
ii)
x
Y
i) area = VS(s - a)(s - b)(s - c) + .
a.) p
( 08 Marks)
5 ' a + b a b
,-.E
5 c. Write a C program to find largest of three numbers using ternary operator. (06 Marks)
..- 0
? ._
.
Module-2
. ,
O E
3
. -4
Q
?
0 3 a. Explain the following selection statements with syntax and flow chart :
,.
et 0
i) nested if ii) else - ifladder.
-0
(06 Marks)
ao .c
,

,3 m b. With example bring out the differences between while loop and do - while loop. (06 Marks)
.
..6. ,.
o C. Design a C program to perform operations of a simple calculator using switch statement.
, .-?
O z
Provide a provision to display an error message when an attempt is made to divide a number
?, ,;
by zero. (08 Marks)
c
0

v
OR
----- ci,
o cl
? 4 a. Explain the working of for loop and write a C - program to find n - Fibonacci series, where
?t''' . 0
4- .) n is specified by the user. (08 Marks)
3 0
tz"-
b. Explain the following unconditional statements with syntax and example :
i... ,...,
i) goto ii) continue. (06 Marks)
= -
c
t
? ?
>, =4-
c. Design a C - program to read a Four - digit number from user and calculate the reverse of
to
the number and check if the number is palindrome or not. (06 Marks)
7
8
.

? F.
5 ' >
o E-.',
Module-3
o
(5
,
5 a. De fine Array. Explain the methods of initializing one dimensional array with suitable
-
,
t
,i examples. (06 Marks)
u b. What are Functions? Explain the following terms with example.
0
z i) Function declaration ii) Function definition iii) Function call. (08 Marks)
c. What is Recursion? Write a C program to find factorial of the given number using recursion.
a
(06 Marks)
F. --
OR
17PCD13/23
6
a. Explain the String Manipulation Functions with syntax and code fragments.
i) strlen ii) strcmp. (06 Marks)
b. With example explain different type of Functions based in parameters. (08 Marks)
e. Write a C ? Function to search an element in the given array using Linear search by passing
array as an argument. (06 Marks)
Module-4
7 a. What is Structure? Explain the methods of declaration and initialization of structures with
example. (06 Marks)
b. Write a C ? program to maintain record of n employee details using array of structures with
three fields (id, name, salary) and print details of employee whose salary is greater than
5000. (08 Marks)
c. What is a file? Explain fopen and (close functions. (06 Marks)
OR
8 a. Explain the following file operations with example :
i) fprintf ( ) ii) fseek ( ) iii) fputc ( ). (06 Marks)
b. Explain Structure within a structure with example. (08 Marks)
C. Given a file "n.txt" which contains names. Write a C ? program to create a new file "abc.txt"
and copy the contents from "n.txt" to "abc.txt". (06 Marks)
Module-5
9 a. What are Pointers? How pointer variables are declared and initialized.
b. Explain the concept of adding and deleting nodes in the linked list.
c. Develop a C program to swap two numbers using pointers.
OR
10 a. Explain different dynamic memory allocation schemes in C with example.
b. Explain any three preprocessor directives with example.
c. What is a Stack? Explain the operations on stack.
SOci
4
;;;N?
,

.0.0?1 I I Ow. loft \s,
CHIKODI
LIBRARY
44
-

(06 Marks)
(07 Marks)
(07 Marks)
(08 Marks)
(06 Marks)
(06 Marks)
FirstRanker.com - FirstRanker's Choice

This post was last modified on 01 January 2020