0% found this document useful (0 votes)
4 views1 page

C Programming Assignment Questions

Copyright
© © All Rights Reserved
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)
4 views1 page

C Programming Assignment Questions

Copyright
© © All Rights Reserved
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

NRI INSTITUTE OF TECHNOLOGY

(An Autonomous Institution)


Approved by AICTE, New Delhi: Permanently Affiliated to JNTUK, Kakinada
Accredited by NAAC with "A" GRADE, Accredited by NBA (CSE, ECE, EEE, IT&ME)
An ISO 9001:2015 Certified Institution
Pothavarappadu (V), Agiripalli (M), Eluru District, A.P., India, Pin: 521 212
URL: [Link], email: principal@[Link], Mobile: + 91 8333882444
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
ASSIGNMENT – II
CLASS: I [Link] I Semester (NRIA23) ACADEMIC YEAR: 2024 – 25
DATE: 18-12-24
BRANCH: CSE Max. Time: 1 Hour
SUBJECT: Introduction to Programming (23A1105301) Max. Marks: 10 Marks
Answer All Questions- Each question carries 5 marks
[Link] Question Marks BTL CO PO
1 Define a function in C and explain Various Categories of functions
with an examples? Write a simple function to calculate the square of 5 1 3 1, 2,4
an integer.
2 Compare and contrast "Call by Value" and "Call by Reference" in 2
functions. Provide examples to illustrate how each method works. 5 3 1, 2,3,4
3 Make use of recursion with an example. Differentiate between direct
recursion and indirect recursion. Discuss the advantages and 5 3 3 1, 2,3,4
disadvantages of recursion compared to iteration.
4 What is the scope and lifetime of automatic (auto), static, and 1 1, 2,3,4
external (extern) variables? Illustrate with examples. 5 3
5 Examine is the difference between recursion and iteration in terms 5 4 1, 2,3
of memory usage, performance, and ease of understanding? 3
6 Write a function that uses an array as a parameter and modifies the 5 1 1, 2,3,4
contents of the array. Explain the concept of passing arrays to 3
functions.
7 Discuss the various types of recursion (e.g., tail recursion, head 5 2 1, 2,3
recursion) and their differences in terms of efficiency. 3
8 Analyze the different storage classes in C: auto, register, static, and 4
extern. Discuss their scope, lifetime, and typical use cases. 5 3 1, 2,3
9 Choose the rules for writing a recursive function? Illustrate with an 5 3 1, 2
example of calculating Fibonacci numbers using recursion. 3
10 Write a program that demonstrates the use of static variables in C. 5 1 1, 2,4
Explain how static variables differ from local variables in terms of 3
scope and lifetime.
11 Explain the main advantages and disadvantages of using recursion? 5 2 1, 2
In which cases is recursion preferred over iteration? Provide 3
examples of problems best solved by recursion.
12 What is the difference between a function prototype and a function 5 1 3 1,2,3,4
definition? Why are function prototypes important in C/C++
programming? Illustrate with an example.

Question Regd Numbers


No(S)
1,11 24KN1A0501-24KN1A0511, PPDV-30
2,12 24KN1A0512-24KN1A0522, PPDV-13
3,10 24KN1A0523-24KN1A0533, PPDV-37
4,9 24KN1A0534-24KN1A0544, PPDV-39
5,8 24KN1A0545-24KN1A0555, PPDV-12
6,7 24KN1A0556-24KN1A0566, PPDV-32

Signature of Course Instructor Signature of Course Coordinator Signature of the Head of Department

You might also like