0% found this document useful (0 votes)
35 views

C Prog

This document contains instructions for a Foundations of Computing course assignment with 6 questions. The assignment involves creating and manipulating C structures to store student data including roll number, name, department, course, and year of passing. Functions are to be written to print student names by year and get data for a student by roll number. Other questions cover differences between structures and arrays/unions, finding name lengths without built-in functions, applications of self-referential structures, and a program to find digit factorials and display text backwards using pointers.

Uploaded by

Rehan Ghani
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 DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views

C Prog

This document contains instructions for a Foundations of Computing course assignment with 6 questions. The assignment involves creating and manipulating C structures to store student data including roll number, name, department, course, and year of passing. Functions are to be written to print student names by year and get data for a student by roll number. Other questions cover differences between structures and arrays/unions, finding name lengths without built-in functions, applications of self-referential structures, and a program to find digit factorials and display text backwards using pointers.

Uploaded by

Rehan Ghani
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 DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

Course Title: Foundations of Computing

Class: Term: Section:


Batch:

Max. Marks: Date of Allotment:


Date of Submission:

Part-A

Q1. Create a structure to specify data on students given below:

Roll_no, name, deptt, course, year_of_passing

Assume that there are not more than 200 students in the college.

(a) Write a function to print names of all students who joined in a


particular year.
Write a function to print the data of a student whose roll number is given.

Q2. How a structure is different from an array & union. Explain it along
with an example?

Q3. Write a program to find the length of the names of all the students of
the section without using any inbuilt function. The names will be entered
by the user on the run time with the number of students in section as well.
Implement the concept with the help of pointers only.

PART-B

Q4. Where self-referential structures find their applications? Explain

Q5. Create a function to find the sum of the factorial of each of the digits
of the number. If in any case the factorial comes out to be the multiple of
5, it should be divided by the 5 first and then the output should be
displayed to the user. Do with the help of pointers only.

Q6. Write a program using pointers that will enter a line of text, store it in
computer’s memory and then display it backwards. Assume it will not
exceed 80 characters.

You might also like