This page offers a comprehensive collection of Previous Year Questions (PYQs) on
Pointers and File Handling in C Programming collected from examinations conducted
by reputed engineering colleges like JNTUH, CBIT, VASV and VCE.
The questions are organized topic-wise with answers and explanations to help students prepare
effectively for semester exams, practical lab viva, and competitive assessments.
Year – 2025
-
A pointer variable contains the ______ of another variable.
(VCE–2025)
2M
-
How do you declare a pointer to a pointer?
(CBIT–2025)
2M
-
Write a program to demonstrate the use of pointers to strings.
(CBIT–2025, VCE–2025)
5M
Year – 2024
-
What is a pointer in C?
(CBIT–2023, VCE–2024)
2M
-
Write a C program to demonstrate how pointers are handled in a program.
(CBIT–2023, VCE–2024)
5M
-
How can a pointer be used to access individual elements of an array?
Explain with an example.
(CBIT–2022, VCE–2024)
5M
-
Explain the use of pointers to structures with examples.
(CBIT–2022, VCE–2024)
5M
-
Write a C program to demonstrate pointer arithmetic on an integer array.
(VCE–2024)
5M
Year – 2023
-
Explain types of pointers in brief.
(JNTUH–Mar/Apr-2023)
5M
-
Write a C function that returns a pointer to the maximum of two integers.
(VASAVI–2023)
5M
Year – 2025
-
Why do we need files?
(VCE–2025)
2M
-
Write a program to open, write to, and read from a text file in C.
(CBIT–2025)
5M
-
Illustrate random access file operations with examples.
(CBIT–2025)
5M
-
Write a C program to reverse the contents of a given file.
(VCE–2025)
5M
Year – 2024
-
List some file input/output functions.
(CBIT–2023, VCE–2024)
2M
-
List out the different file access modes in C.
(CBIT–2023, VCE–2024)
2M
-
How can you check if a file exists before opening it in C?
(JNTUH–Jan/Feb-2024)
1M
-
Compare #ifdef and #ifndef.
(JNTUH–Jan/Feb-2024)
5M
-
Append data to text file program.
(JNTUH–Jan/Feb-2024)
5M
-
Write a C program to create a text file and find the total number of characters
and lines in it.
(VCE–2024)
5M
-
Write a program to open the file File1.txt, write text, read it again
and display it on the monitor.
(VASAVI–2024)
5M
Year – 2023
-
Demonstrate fclose() function.
(JNTUH–Mar/Apr-2023)
1M
-
Write about #ifdef in brief.
(JNTUH–Mar/Apr-2023)
1M
-
How do you append data to an existing file in C?
(JNTUH–Sep-2023)
1M
-
Explain pointer for inter-function communication.
(JNTUH–Mar/Apr-2023)
5M
-
Explain text file modes.
(JNTUH–Mar/Apr-2023)
5M
-
Write a C program using feof() and ferror().
(JNTUH–Mar/Apr-2023)
5M
-
Explain file operations in detail.
(JNTUH–Mar/Apr-2023)
5M
-
Write a C program to copy one file to another.
(CBIT–2023, VCE–2024, VASAVI–2023)
5M
-
Write a simple C program to open, read and close a file.
(CBIT–2023, VCE–2024)
5M
-
Given two files file1.txt and file2.txt, write a program to copy contents
and display the output.
(VASAVI–2023)
5M
Year – 2022
-
Write the common uses of
rewind() and ftell() functions.
(CBIT–2022)
5M