শনিবার, ১৭ অক্টোবর, ২০১৫

Draw the linklist of folowing code !

#include <stdio.h>
#include<stdlib.h>
struct node{
int rool;
struct node*next;

};

struct none *head;
int main(void) {


struct node*temp=malloc(sizeof(struct node));
temp->rool=1;                                                       

head=temp;

struct node*temp1=malloc(sizeof(struct node));
temp1->rool=2;
temp->next=temp1;
struct node*temp2=malloc(sizeof(struct node));
temp2->rool=3;
temp1->next=temp2;
temp2->next=NULL;
printf("%d\t%d\t%d",temp->rool,temp1->rool,temp2->rool);
printf("%p%p%p",temp,temp1,temp2);
    return 0;
}

২টি মন্তব্য: