1CSM1 PPSC T12 AY2023-2024 Pointers and Files
1CSM1 PPSC T12 AY2023-2024 Pointers and Files
Tutorial 12 (T12)
(UNIT – IV)
Problem
Answer the following questions. CO CDLL
No
[1] Write the code to swap 2 given numbers using pointers CO4 [Ap]
[2] Write the code to find average of all array values using pointers CO4 [Ap]
to array.
[3] Write a program to read the file name and display the file CO4 [Ap]
content on the console.
[4] Write a program to read the file name from the user and create CO4 [Ap]
its copy, the new file name should also be the user input.
[5] Write a program to read the file content and display the count CO4 [Ap]
of alphabets, digits, spaces, no.of lines and special characters
in it.
[6] Write a program to read a student’s details and store the details CO4 [Ap]
in a file.
Self Practice Questions
[7] Write the code to find greatest of 2 numbers using pointers.
[8] Write a program to read a file and create N number of CO4 [Ap]
duplicates.
[9] Write a program to read the student details from the file and CO4 [Ap]
display only the selected rollnumber.
[10] Write a program to flip the case of the alphabets of a given file CO4 [Ap]
name
[11] Write a program to merge two files into single file. CO4 [Ap]
[12] Consider a file containing alphabets and numbers. You must CO4 [Ap]
develop a program which reads the content of the file and write
the content on to the output screen if it is a number otherwise
write the content into another file.
Course Faculty:
I.Sai Rama Krishna,
Assistant Professor,
Dept. of CSE (Networks)