Programming for Problem Solving Unit 5 – Pointers File Handling and Preprocessors: AKTU previous year questions
8 AKTU questions from Unit 5 (Pointers File Handling and Preprocessors) asked in 2026, tagged by marks, year and topic. In short: about 29 marks of every paper come from this unit; the most asked topic is Pointers (34 times); 4 questions came back in a later year. The latest ones are listed below; on the page you can filter them by 2-mark or long questions, topic and repeats.
Unit 5 previous year questions
- What is a macro? Give an example of a simple macro definition. (2 marks, 2026, C Preprocessors and Macros)
- List various file opening modes. (2 marks, 2026, File Handling)
- Explain the use of command-line arguments (argc, argv) and show with an example how to access them in C. (7 marks, 2026, C Preprocessors and Macros)
- Explain the concept of dynamic memory allocation. Write a C program that dynamically allocates memory for one integer using malloc (), assigns a value, prints it, and then frees the memory. (7 marks, 2026, Pointers)
- Explain the different file opening modes in C (r, w, a, r+, w+, a+). What is the difference between text files and binary files? Give one example of opening a file in “append” mode. (7 marks, 2026, File Handling)
- Discuss dynamic memory allocation. Explain calloc(), malloc(), realloc() and free() functions with suitable example. (7 marks, 2026, Pointers)
- List out various file operations and modes in C. Write a 'C' program to copy the content from one file to another file. (7 marks, 2026, File Handling)
- Write a C program to accept a text file name from the user and display its entire contents on the screen. Use appropriate file I/O functions and handle the end-of-file condition correctly. (7 marks, 2026, File Handling)
Most asked Unit 5 topics
- Pointers – asked 34 times
- File Handling – asked 20 times
- C Preprocessors and Macros – asked 12 times
Unit 5 question pattern
- 2-mark questions: 2 asked in 2026
- 7-mark questions: 6 asked in 2026
- About 29 marks from Unit 5 in every paper
- 4 questions were asked again in a later year
Unit 5 questions year by year
- 2026: 8 Unit 5 questions asked (46 marks across that year's papers)