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

C Programming SET B

Uploaded by

Aashish Rokka
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

C Programming SET B

Uploaded by

Aashish Rokka
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

PRE-TEST EXAMINATION PAPER

Program : BSc.IT
Course : Introduction C Programming
Course Code : CT018-3-1
Year/ Semester : I Year / I Semester
Intake : September,2023
Date : 9th February 2024
Time Duration : 1.5 Hours
Set :B

Instruction to candidates
1. This question paper has Three (3) Sections.
2. Answer ALL questions in Section A, Very Short Answer Questions.
3. Answer Five out of Seven questions in Section B, Short Answers Questions.
4. Answer Two out of Three question in Section C, Long Answers Questions.
5. No scripts or answer sheets are to be taken out of the Examination Hall.
6. Mobile phones are strictly prohibited in the Examination Hall.

Do not open this question paper until instructed.


SECTION A 50 > p ≥ 40 Third division
Very Short Answer Questions (10x1=10)
Otherwise Fail.
1. Define global and local variables. Assume each subjects carrying 100 full marks and students must secure greater
2. Select a function which is used to read a single character from a file at a time? or equal to 40 in each subject for division
a) fputc( ) 2. Design a flowchart for checking whether the number given by user is exactly
b) fscanf( ) divisible by 5 or 11
c) fputs( ) 3. Write a program to read and print data stored in a file “input.txt”
d) fgetc( ) 4. Write a program to calculate sum of first 10 odd numbers
5. Explain any 5-string library function with a example
3. List the difference between ++i and i++ in C.
6. Define structure and its use? How can the members of the structure can be
4. What is the difference between == and = in C?
accessed using point/dot operator (.)? Demonstrate with example.
5. How do you include comments in C code?
7. When is recursive function important? Find the factorial of a number using
6. Which mode is better to open an existing file for both reading and writing?
recursive function
a) “w”
b) “w+”
c) “r+” SECTION C
LONG ANSWER QUESTIONS
d) “a+” Answer ANY TWO Questions. (2x10=20)
7. Define the use of & and * operator in pointer in C?
1. Create a structure student having data members name, roll number and
8. Difference between switch and if statement in C?
percentage. Create an array of structure to store information for five students.
9. Difference between user defined and built-in function in C.
Write a program to display the name of students having percentage greater than
10. List the different types of error in programming
or equal to 60.
SECTION B 2. Develop a C program for managing patient records using structures. Each
SHORT ANSWER QUESTION patient record should include details like name, age, diagnosis, and treatment.
Answer ANY FIVE Questions. (5x4=20)
Implement functions to add new patient records and search for patients based
1. Write a program to read the marks of four subjects then find total, percentage on name. Store all patient data in a file “patient.txt” [Mandatory Question]
and division according to given condition 3. Explain various modes in which file can be opened? Write a program to
Percentage Division CREATE and WRITE N numbers in a file "NUMBER.TXT”. Open this file
p ≥ 80 Distinction then read its content and put all even numbers in one file "EVEN.TXT" and
80 > p ≥ 70 First division odd numbers in another file "ODD.TXT".
70 > p ≥ 50 Second division

You might also like