Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
1Activity
0 of .
Results for:
No results containing your search query
P. 1
CPR - QB Chapter 04 New

CPR - QB Chapter 04 New

Ratings: (0)|Views: 21 |Likes:
Published by api-3728136

More info:

Published by: api-3728136 on Dec 05, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

03/18/2014

pdf

text

original

K. K. Wagh Polytechnic, Nashik \u2013 3
Question Bank: Programming in \u2018C\u2019 (9017) Class: FYI F
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 \u2018book\u2019 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(\u201cEnter values of a and b :\u201d);
scanf(\u201c%d %d\u201d,&a,&b);
if(a<b)
printf(\u201clarge : %d\u201d,b);
else
printf(large : %d\u201d,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 \u2018Book\u2019 having data members title, author and price.
Accept this data for one variable and display accepted result.
4
CPR \u2013 Question Bank Chapter 04
- 1 -

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->