Posts

Showing posts from April, 2026

Data Structure Using C ( LEAK Code 💦 )

Image
 Experiment 1: Insertion and Deletion in Array (C Program) //Experiment 1: Insertion and Deletion in Array (C Program) #include <stdio.h> int main() {     int arr[10], n, pos, val;     printf("Enter the number of elements: ");     scanf("%d", &n);     printf("Enter %d elements:\n", n);     for (int i = 0; i < n; i++)         scanf("%d", &arr[i]);     printf("\nEnter position and value to insert: ");     scanf("%d %d", &pos, &val);     for (int i = n; i > pos; i--)         arr[i] = arr[i - 1];     arr[pos] = val;     n++;     printf("Array after insertion: ");     for (int i = 0; i < n; i++)         printf("%d ", arr[i]);     printf("\n");     printf("\nEnter position to delete: ");     scanf("%d", &pos);     n--;     for ...