Question: C PROGRAM NEED SAME OUTPUT 1 - Provide a menu to manipulate or display the value of variable of type To take 8 consecutive bytes
C PROGRAM NEED SAME OUTPUT
1 - Provide a menu to manipulate or display the value of variable of type
To take 8 consecutive bytes in memory. Provide a menu to manipulate or display the value of variable of type t (input) & indexed at i (i/p)
Description:
Allocate 8 consecutive bytes in memory
Provide a display menu
1. Add element
2. Remove element
3. Display element
4. Exit from the program
It should allow to add elements of different data types which data type size is less than or equal to 8
Pr-requisites:-
Pointers
Dynamic memory allocation
Objective: -
To understand the concept of
Dynamic memory allocation
Note:- You need to submit the assignment. It's not auto-evaluation. Evaluation will be done by Mentors. Inputs: -
Integers N1 and N2
Sample execution: - Test Case 1: Menu : 1. Add element 2. Remove element 3. Display element 4. Exit from the program
Choice ---> 1 Enter the type you have to insert: 1. int 2. char 3. float 4. double Choice ---> 2 Enter the char : k 1. Add element 2. Remove element 3. Display element 4. Exit from the program Choice ---> 3 ------------------------- 0 -> k ------------------------- 1. Add element 2. Remove element 3. Display element 4. Exit from the program Choice ---> 1 Enter the type you have to insert: 1. int 2. char 3. float 4. double Choice ---> 1 Enter the int : 10 1. Add element 2. Remove element 3. Display element 4. Exit from the program Choice ---> 3 ------------------------ 0 -> k (char) 1 -> 10 (int) ------------------------ 1. Add element 2. Remove element 3. Display element 4. Exit from the program
Choice ---> 2 0 -> k 1 -> 10 Enter the index value to be deleted : 0 index 0 successfully deleted. 1. Add element 2. Remove element 3. Display element 4. Exit from the program Choice ---> 4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
