You are on page 1of 13

A Workbook for

PROGRAMMING IN ‘C’
(22226)
Academic Year: 2022-23

SEMESTER II

Diploma in Computer Engineering Group


(CO)

Name of Student: …………………………………………………….

Enrollnment No:……………………… Roll No:………………………

Bhivrabai Sawant Polytechnic, Wagholi, Pune.


Department of Computer Engineering.

11
JAYAWANT SHIKSHAN PRASARAK MANDAL’s
Bhivrabai Sawant Polytechnic
(Approved by AICTE, New Delhi, Govt. of Maharashtra, Affiliated to MSBTE Mumbai)
Gat No. 720 (1&2), Wagholi, Pune-Nagar Road, Pune-412207)
Phone: 020 – 65335100 Tele fax: - + 91-020-65335100
E-mail: bspoly@rediffmail.com Website: www.jspm.edu.in

Vision and Mission of the Institute

Vision:
To develop globally competent technocrats by imparting quality technical education for socio-
economic enhancement of the nation.

Mission:
M1: To nurture and maintain an environment of high academic standard for diploma students,
encouraging higher education and entrepreneurial abilities.
M2: To deliver quality education by imparting basic engineering knowledge, interpersonal skills,
critical thinking and creativity.
M3: To equip students with technical skills, ethical and moral values to meet aspirations of the society
and industry to contribute sustainable development of the nation.

11
JAYAWANT SHIKSHAN PRASARAK MANDAL’s

BhivrabaiSawant Polytechnic
(Approved by AICTE, New Delhi, Govt. of Maharashtra, Affiliated to MSBTE Mumbai)
Gat No. 720 (1&2), Wagholi, Pune-Nagar Road, Pune-412207)
Phone: 020 – 67335100 Tele fax: - + 91-020-67335100
E-mail: bspoly@rediffmail.com Website: www.jspm.edu.in

Computer Engineering Department


Academic Year: 2022-2023

Vision

To develop technical manpower in the field of computer engineering to contribute the Socio-industrial requirement.

Mission

M1: To develop techno-savvy engineers by imparting comprehensive computer engineering knowledge by innovative
teaching and learning process.
M2: To develop professional skills committed for lifelong learning through co-curricular and extracurricular activities.
M3: To impart Computer Engineering education in order to meet societal and industry needs.

Course Coordinator Module Coordinator HOD

11
INDEX

Unit Title Assessment Marks Remark Sign of Staff


No Date

I
Program Logic
Development
II Basics of ‘C’
Programming
Control
III Structure
Array and
IV Structure
V Functions
VI Pointers

Course Coordinator H.O.D.

UNIT NO IV : Arrays and Structures

11
Que.N Bloom’s CO Questions
o. Level

1 R COI204 Define:
.3 (i) Two dimensional array

(ii) Multi-dimensional array


Marking Scheme 2 Marks 1 mark each for type

-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
Answer -----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
--------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----
2 R COI204 Define array. How one dimensional array is declared?
.3
Marking Scheme Correct defination and declaration 2M

-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----
Answer -----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------

11
-----------------------------------------------------------------------------------------------------
-----
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----
3 U COI204 Develop a program to accept an integer whether it is palindrome or not. (Note:
.3 If string is considered instead of number for palindrome checking, then that
logic shall be considered)
Marking Scheme

-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
--------
-----------------------------------------------------------------------------------------------------
Answer
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
11
--------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
----

4 U COI204 Give a method to create, declare and initialize structure develop a program to
.3 demonstrate nested structure.
Marking Scheme 4M

-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
--------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
Answer
-----------------------------------------------------------------------------------------------------
-----------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
---------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------

11
-----------------------------------------------------------------------------------------------------
-----------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
---------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------

5 U COI204 Design a programme in C to read the n numbers of values in an


.3 array and display it in reverse.
Marking Scheme 4marks 2 for logic 2 for syntax

-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
Answer
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
--------------------

11
6 U COI204 Write a program to find transpose of 3 x 3 matrix.
.3
Marking Scheme 4marks 2 for logic 2 for syntax

-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
Answer -----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------
----

7 U COI204 Write a program to sort array element in descending order. (Note: Any sorting
.3 logic shall be considered).
Marking Scheme 4M Correct Program
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
--------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------

11
-----------------------------------------------------------------------------------------------------
Answer -----------------------------------------------------------------------------------------------------
-----------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
---------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
--------------------
-----------------------------------------------------------------------------------------------------
-
8 R COI204 Explain declaration and initialization of two dimensional array.
.3
Marking Scheme Explanation 2M, Example 2M
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------

11
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
Answer -------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
----
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
---

9 R COI204 Explain structure with suitable example.


.3
Marking Scheme 4M
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
Answer -------
-----------------------------------------------------------------------------------------------------
11
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
----
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
---

10 U COI204 Describe the concept of array of structure with example.


.3
Marking Scheme 6M
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
Answer -------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
11
----
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
---

11

You might also like