0% found this document useful (0 votes)
198 views2 pages

CPR - QB Chapter 04 New

This document contains question banks for exams on the topic of functions and structures in the C programming language from the summers of 2007 and 2008 and winter of 2007 and 2008 from K. K. Wagh Polytechnic in Nashik, India. It includes questions about defining functions and structures, declaring and initializing structures, arrays of structures, passing structures to functions, and more. The questions range from 2 to 4 marks and cover basic concepts as well as examples of implementing functions and structures in C code.

Uploaded by

api-3728136
Copyright
© Attribution Non-Commercial (BY-NC)
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)
198 views2 pages

CPR - QB Chapter 04 New

This document contains question banks for exams on the topic of functions and structures in the C programming language from the summers of 2007 and 2008 and winter of 2007 and 2008 from K. K. Wagh Polytechnic in Nashik, India. It includes questions about defining functions and structures, declaring and initializing structures, arrays of structures, passing structures to functions, and more. The questions range from 2 to 4 marks and cover basic concepts as well as examples of implementing functions and structures in C code.

Uploaded by

api-3728136
Copyright
© Attribution Non-Commercial (BY-NC)
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/ 2

K. K.

Wagh Polytechnic, Nashik – 3

Question Bank: Programming in ‘C’ (9017) Class: FYIF


Chapter No. 04 Functions and Structures
Summer 2007: Marks = 12
a) Define function prototype. 2
b) Declare and define a structure employee having
member variables as emp_id, emp_name & salary. 2
c) Explain with example: structure initialization and declaration. 4
d) Write a program to declare the structure student
having member variables roll_no and name. Accept
data for three students and display it. 4

Winter 2007: Marks = 12


a) Give the syntax of declaring structure. 2
b) Define function. 2
c) Explain what is structure and array of structure.
Declare a structure with elements as roll_no and name.
Declare array of structure for 10 students. 4
d) Declare a structure ‘book’ having data members as
title, author and price. Accept this data for one structure
variable and display accepted data. Write a program. 4

Summer 2008: Marks = 16


a) Explain function definition. Give syntax for function. 2
b) Give general form of structure and define a structure student having
member variables as roll_no, name and dob. 2
c) Write the output of following program. Take suitable input. 4
#include<stdio.h>
void large( )
{
int a,b;
printf(“Enter values of a and b :”);
scanf(“%d %d”,&a,&b);
if(a<b)
printf(“large : %d”,b);
else
printf(large : %d”,a);
}
main( )
{
large( );
large( );
}
d) Define two structures date and account.
Date has members: day, month, year
Account has members as: acc_no, balance, dob
Assign initial values to them. 4
e) Declare a structure ‘Book’ having data members title, author and price.
Accept this data for one variable and display accepted result. 4

CPR – Question Bank Chapter 04 -1-


K. K. Wagh Polytechnic, Nashik – 3

Winter 2008: Marks=16


a) What do you by structure? Give syntax of declaring it. 2
b) Define recursion. 2
c) What is function? Explain the need of function. 4
d) Explain with example the array of structure. 4
e) Write a program to define a structure employee with members emp_name,
emp_id and salary. Accept data for one employee and display it. 4

Other: Marks
a) Explain recursion with example 4
b) State types of the functions. 2
c) Describe the use of static and extern variables. 4
d) Explain the meaning of register and auto storage classes. 4
e) Define scope, lifetime & visibility of variables. 2
f) Differentiate structure and array with example. 4
g) Give syntax of declaring a function. 2
h) Define global and local variables. 2

Mr. Kute T. B.
Lecturer in Information Technology,
K. K. Wagh Polytechnic, Nashik – 3.
[email protected]

CPR – Question Bank Chapter 04 -2-

You might also like