The assignment requires submission by March 28, 2025, and includes a follow-up viva. It covers topics such as functions, pointers, arrays, structures, and linked lists, with specific tasks including finding the largest number in an array, converting decimal to binary, managing dangling pointers, circularly shifting values, merging sorted arrays, and managing an employee payroll system. Additionally, it involves creating and manipulating both singly and doubly linked lists with various operations.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
8 views2 pages
Assignment 1
The assignment requires submission by March 28, 2025, and includes a follow-up viva. It covers topics such as functions, pointers, arrays, structures, and linked lists, with specific tasks including finding the largest number in an array, converting decimal to binary, managing dangling pointers, circularly shifting values, merging sorted arrays, and managing an employee payroll system. Additionally, it involves creating and manipulating both singly and doubly linked lists with various operations.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2
Assignment - 1
Last date of submission 28th March 2025
Follow-up viva will be conducted for the assignment. Kindly keep assignment hardcopy during viva. Topic – Function, pointers, arrays, structure, linked list, doubly linked list 1. Write a function that return the largest number in a user defined array which is passed as parameter. 2. Write a function to find the binary equivalent of a given decimal integer and display it. 3. Write a C program that demonstrates the concept of a dangling pointer. Create a function to allocate memory dynamically, return a pointer to the allocated memory, free the memory inside the function, and then attempt to access the memory through a dangling pointer in the main function. Finally, discuss the consequences of using dangling pointers and how to prevent or mitigate such issues. 4. Given three variables x, y, z write a function using call by reference method to circularly shift their values to right. In other words if x = 5, y = 8, z = 10 after circular shift y = 5, z = 8, x =10. 5. Write a function that efficiently merges two sorted arrays into a single sorted array, utilizing dynamic memory allocation.[Ex a = {1, 3, 5} b = {2, 6, 7} output 1, 2, 3, 5, 6, 7]. 6. Write a program to manage an employee payroll system using structures to store information such as employee ID, name, salary, etc. Implement functions for salary calculation, deduction, and displaying employee details. 7. Create a linked list and perform following operations a. Insertion in beginning b. Insertion at end c. Deletion from the beginning d. Deletion from end e. Insertion at position n, entered by the user. 8. Create a doubly linked list and perform above operations from a – d.