i want to write this program without lib and string files make changes in it and tell me the program thanks code is below
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
#include<string.h>
struct Node;
typedef struct Node * PtrToNode;
struct Node
{
char element;
PtrToNode Next;
};
PtrToNode MakeEmpty(PtrToNode L)
{
L= new(Node);
L->Next=NULL;
return L;
}
void Push(PtrToNode L,char x)
{
PtrToNode S;
S= new(Node);
S->element=x;
S->Next=L->Next;
L->Next=S;
}
char Pop(PtrToNode L)
{
PtrToNode P;
P=L->Next;
char x=P->element;
L->Next=P->Next;
free(P);
return x;
}
int main()
{
PtrToNode L;
L= MakeEmpty(NULL);
char Input[1000];
int i;
printf("please enter your equation:");
scanf("%s",Input);
for (i = 0;i<strlen(Input);i++)
{
if (Input[i]=='(')
{
Push(L,Input[i]);
}
if (Input[i]==')')
{
if (L->Next==NULL)
{
printf("incorrect");
return 0;
}
else
Pop(L);
}
}
if (L->Next==NULL)
printf("correct");
else
printf("incorrect");
getch();
return 0;
}