#include "conio.h"
#include "stdlib.h"
#include "string.h"
struct link_list
{
int data;
struct link_list *next;
};
struct link_list *front,*temp,*p,*q,*sum,*k,*s,*stack,*temp1,*temp2;
void push(int);
struct link_list *add(struct link_list *,int);
struct link_list *createlist(struct link_list *,char *);
struct link_list *addint(struct link_list *,struct link_list *);
void display();
void show();
void main()
{
char *str1,*str2;
s=front=p=q=k=NULL;
clrscr();
printf("Enter the first number:"); /* we read both the numbers as two
strings */
scanf("%s",str1);
printf("Enter the second number:");
scanf("%s",str2);
p=createlist(p,str1);
q=createlist(q,str2);
sum=addint(p,q);
display();
getch();
}
struct link_list *createlist(struct link_list *node,char *s)
{
char *c;
int i=0;
int data;
strrev(s);
while(i
strncpy(c,s+i,4);
}
No comments:
Post a Comment