Pgdca 1 Sem Programming in C 217 Dec 2018
Pgdca 1 Sem Programming in C 217 Dec 2018
com
Unit - V
Code No. : 01/217
Q.5 A. Declare a structure student with Roll_Number, Name and Gender as
First Semester Examination, Dec. 2018
members. (2)
PGDCA
Q.5 B. What is the use of dot (.) operator in C? (2)
OR
PROGRAMMING IN C
Time : 3 Hrs. Max. Marks : 100
How are structures different from arrays? Explain with example. • Part A and B of each question in each unit consist of very short answer type
questions which are to be answered in one or two sentences.
Q.5 D. What is the difference between Structure and Union? (12) Part C (Short answer type) of each question will be answered in 200-250
words.
OR
Part D (Long answer type) of each question should be answered within
Declare a structure to store the details of an Employee as Employee • the word limit 400-450.
Number, Name, Gender, Salary and mobile number. Initialize the details
of 2 Employees and display them. Unit - I
Q.1 A. How to declare a constant float variable PI and initialize it with the value
---x--- 3.14. (2)
OR
Q.1 D. Write a C program to read two integers as input from the user and
print their average. If the inputs are 2 and 3 then the output should
be 2.50. (12)
P.T.O.
http://www.hyvonline.com
OR
Q.3 C. Explain Recursion with example. (4)
Write a C program to read the principal, rate of interest and
time as input and calculate the simple interest using the formula in- OR
terest = (principal * rate * time) / 100.
Write a C program to print the Fibonacci series 1, 1, 2, 3, 5, 8, 13,
21... up to 10 terms using recursion.
Unit - II
Q.3 D. What do you mean by user defined function? Give an example
program to explain user defined function. (12)
Q.2 A. What are the different kinds of loops in C? (2)
OR
Q.2 B. Give the syntax of if -else statement. (2)
What are the advantages of creating user defined functions? Explain
Q.2 C. Give the syntax of switch statement in C. (4)
the steps to declare, define and call a function using an example
OR program.
Explain the importance of break statement in switch case using example Unit - IV
program.
Q.2 D. Write a C program to read three integers from the user and print the value Q.4 A. Give a statement to declare a pointer to an integer pointer. (2)
of the largest of them. (12)
Q.4 B. What is the use of address of operator? (2)
OR
Q.4 C. What are the uses of pointers in C? (4)
Write a C program to read an integer and print whether that integer is
positive, negative or zero. OR