Question description Lalitha is a IT expert who training youngsters struggling in coding to make them better. Lalitha usually gives interesting problems to the youngsters to make them love the coding.One such day Lalitha provided the youngsters to solve that The new node is always placed before the Linked List's head. The newly inserted node becomes the Linked List's new head. If the current Linked List is 11->151->201->251, for example, We add item 5 to the front of the list. The Linked List will then be 5->11->151->201->251. Let's call the function that moves the item to the top of the list push (). The push() must receive a pointer to the head pointer, because push must change the head pointer to point to the new node Constraints: 1 < arr <100 INPUT First line contains the number of datas- N. Second line contains N integers(i.e, the datas to be inserted).
C Program


#include<stdio.h>

#include<stdlib.h>

typedef struct node node;

struct node{int data;node *next;}*start;

void push(int v){

    node *p1=malloc(sizeof*p1);

    p1->data=v;p1->next=start;start=p1;

}

void display(){

    node *t=start;

    printf("Linked List:");

    while(t){printf("->%d",t->data);t=t->next;}

    puts("");

}

int main(){

    int n,v;scanf("%d",&n);

    while(n--){scanf("%d",&v);push(v);}

    display();

}