Download VTU B-Tech/B.E 2019 June-July 1st And 2nd Semester 2015 June-July 14PCD13 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) 2015 June-July 14PCD13 Programming in C and Data Structures Question Paper

RPF
1)
0
0
0
0
(7)
C)
0
0
0
C
USN

14PCD13/23

First/Second Semester B.E. Degree Examination, June/July 2015
Programming in C and Data Structures
Max. Marks;
.)\>
k
r
h
PART-1
24-....,
1 a. What are data types? Mention the different data types supported 43) 'language, giving an
-,p example to each. r v .,,,.
0
(05 Marks)
b. Write a C program which takes as input p, t, r, compute the . life interest and display the
result.
CY
(05 Marks)
c. What is an operator? List and explain various types of op &ors.
op
.40 Marks)
2 a. What is a token? What are different types of t9,Ikj available in C language? Explain.
,; 1,
,-
(08 Marks)
b. Write C expressions corresponding to the following (Assume all quantities are of same type)
/
ii) B = Vs(s ? 90,-13)(s ? c) iii) C = elx+Y
-101

v) X =
11
,,,, vi) X =
- b +
-
42 ? 4ac
. (06 Marks)
e
4;
?
i ?
,,
,
,
-
'
,
Nn ji 2a
What is the value of `x' ' Mowing code segments? Justify your answers :
i) int a, b ; ii) ? , b ;
float x ; Ciloat x ;
a = 4 ;
)
( a = 4 ;
b = 5 ; ..
4
' b = 5 ;
x = bk:-, x = (float) b/a ; (06 Marks)
1
40
r1/4 C<\
PART-2
3 C'What are different types of conditional decision making statements? Explain each with
examples. (10 Marks)
. Write a C program to simulate simple calculator that performs arithmetic operations using
switch statement. Error message should be displayed, if any attempt is made to divide by
.,"
zero. (10 Marks)
4 a. Explain with examples formatted input output statements in C. (06 Marks)
b. List four differences between while loop and do-while loop along with syntax and example.
(06 Marks)
c. Design and develop a C program to reverse a given four digit integer number and check
whether it is a palindrome or not. (08 Marks)
1 of 2
/ 1
.
LJ
\
Time: 3 hrs.
Note: Answer FIVE questions, selecting
ONE full question from each part.
i) A =
5x +3y
a + b
iv) D=x
25
+y
35
FirstRanker.com - FirstRanker's Choice
RPF
1)
0
0
0
0
(7)
C)
0
0
0
C
USN

14PCD13/23

First/Second Semester B.E. Degree Examination, June/July 2015
Programming in C and Data Structures
Max. Marks;
.)\>
k
r
h
PART-1
24-....,
1 a. What are data types? Mention the different data types supported 43) 'language, giving an
-,p example to each. r v .,,,.
0
(05 Marks)
b. Write a C program which takes as input p, t, r, compute the . life interest and display the
result.
CY
(05 Marks)
c. What is an operator? List and explain various types of op &ors.
op
.40 Marks)
2 a. What is a token? What are different types of t9,Ikj available in C language? Explain.
,; 1,
,-
(08 Marks)
b. Write C expressions corresponding to the following (Assume all quantities are of same type)
/
ii) B = Vs(s ? 90,-13)(s ? c) iii) C = elx+Y
-101

v) X =
11
,,,, vi) X =
- b +
-
42 ? 4ac
. (06 Marks)
e
4;
?
i ?
,,
,
,
-
'
,
Nn ji 2a
What is the value of `x' ' Mowing code segments? Justify your answers :
i) int a, b ; ii) ? , b ;
float x ; Ciloat x ;
a = 4 ;
)
( a = 4 ;
b = 5 ; ..
4
' b = 5 ;
x = bk:-, x = (float) b/a ; (06 Marks)
1
40
r1/4 C<\
PART-2
3 C'What are different types of conditional decision making statements? Explain each with
examples. (10 Marks)
. Write a C program to simulate simple calculator that performs arithmetic operations using
switch statement. Error message should be displayed, if any attempt is made to divide by
.,"
zero. (10 Marks)
4 a. Explain with examples formatted input output statements in C. (06 Marks)
b. List four differences between while loop and do-while loop along with syntax and example.
(06 Marks)
c. Design and develop a C program to reverse a given four digit integer number and check
whether it is a palindrome or not. (08 Marks)
1 of 2
/ 1
.
LJ
\
Time: 3 hrs.
Note: Answer FIVE questions, selecting
ONE full question from each part.
i) A =
5x +3y
a + b
iv) D=x
25
+y
35
PART-3
5 a. What is an array? Explain different methods of initialization of single dimensional arrays.
(06 Marks)
kuo Marks)
Vii
?

(08 Marks)
6 a. Explain function call, function definition and function prototype withexamples to each.
c9'
(06 Marks)
What are actual parameters and formal parameters? Illustrate velli4xample. (06 Marks) b.
What is recursion? Write a C program to compute the factors
-
ofa given number 'n' using
c. , --1
recursion.
6 ,,,,. --,'
(08 Marks)
?
,
PARTr ?A
7 a. How structure is different from an array? ExtA
r
em declaration of a structure with an example.
b. Write a C program to read N integers into an array A and to
i) find the sum of odd numbers
ii) find the sum of even numbers
iii) find the average of all numbers
Output the results computed with appropriate headings.
How string is declared and initialized? Explain any FOUR string manipukl
a
i
with examples.
c.
b.
c.
file47tio
Explain following rations along with syntax and examples :
i) fopen( ) ii) ftet ) iii) fscanf( ) iv) fprintf( ) v) fgets( ).
er of lines and number of white spaces and output the same.
Write a C pro
characters,.
(10 Marks)
(10 Marks)
o read the contents from the file called abc?text, count the number of

?0
0
0
0
0
0
0
0
0
0
C
0
0
0
0
f
-
?
rTh
(
.
14PCD13/23
Explain with an example, how to creatc,structure using `typedef.
Write a C program to input the foll6Orig details of 'N' students using structure :
Roll No : integer, Name : e.ri4g; Marks : float, Grade : char
Print the names of the students$ith marks 70.0%.
PART ? 5
9 a. , paint point variable. Explain with an example, the declaration
b. Explain following C functions along with syntax and example to
rts, ''C\
i) malloc( ) ii) calloc( ) iii) realloc( ) iv) ( ).
c. Develop a C program to read two numbers and function to
pointers. (06 Marks)
?
4
10 Write short notes on following :
a. Preprocessor directives
b. Primitive and non primitive data types
c. Stack operations
d. Types of queues.
2 of 2
(20 Marks)
(06 Marks)
(04 Marks)
(10 Marks)
and initialization of pointer
(06 Marks)
each :
(08 Marks)
swap these numbers using
FirstRanker.com - FirstRanker's Choice

This post was last modified on 01 January 2020