Assessment: C Programming Implementation Tasks
Duration: 1 hour 30 minutes
Date: 28th December 2024
Time: 10:00 AM to 11:30 AM
Instructions
Implement any 3 out of 4 questions provided below. Ensure your code is well-structured,
commented, and adheres to standard C programming practices.
Question 1: Check if the Given Sentence is a Pangram
Write a program to check if a given sentence is a pangram or not.
● Input: A sentence (e.g., The quick brown fox jumps over the lazy dog.)
● Output:
○ If the sentence contains all letters from a to z, output:
The given string has all characters from a to z, hence it’s
a Pangram.
○ Otherwise, output:
The given string does not have all characters from a to z,
hence it’s not a Pangram.
Question 2: Store and Retrieve Student Data from a File
Write a program to store the name and marks of n students in a file and then read and display
them.
● Steps:
○ Accept n (number of students).
○ For each student, accept their name and marks, then store them in a file on the
hard disk.
○ Read the data from the file and display it on the terminal.
● Input:
○ Number of students: n
○ Name and marks for each student.
● Output:
○ Student details from the file in the format:
Name: <name>, Marks: <marks>
Question 3: Implement a Queue using a Linked List
Write a program to implement a queue using a linked list.
● Operations to implement:
○ Enqueue: Add an element to the rear of the queue.
○ Dequeue: Remove an element from the front of the queue.
○ Display the queue.
● Test Cases:
○ Add multiple elements to the queue, remove a few, and display the queue after
each operation.
Question 4: Reverse a Linked List
Write a program to reverse a linked list.
● Steps:
○ Create a linked list.
○ Reverse the linked list using pointer manipulation.
○ Display the reversed linked list.
● Input: A linked list of integers.
● Output:
○ Original linked list: 1 -> 2 -> 3 -> 4
○ Reversed linked list: 4 -> 3 -> 2 -> 1
Evaluation Criteria
1. Code Accuracy: Correctness of implemented solutions.
2. Code Structure: Use of functions and modular design.
3. Readability: Proper comments and variable naming.
4. Execution: Ensure your program compiles and runs without errors.
Good Luck!