Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
linkedlist
#include<stdio.h> //#include<conio.h> typedef struct node { int data; struct node * next; }NODE; NODE * newnode,*start ,*tptr; createNode(int g_data) { newnode = (NODE* )malloc(sizeof(NODE)) ; newnode->data = g_data; newnode->next =NULL; } int main() { int arr[]={30,12,15,7,25,40}; int ind,size; size= sizeof(arr)/sizeof(arr[0]); //clrscr(); for( ind= 0 ;ind < size; ind++) { createNode(arr[ind]); if(start == NULL) // no list { start = newnode; } else { for( tptr = start ; tptr -> next != NULL; tptr = tptr -> next); tptr -> next = newnode; } } for(tptr=start; tptr!=NULL; tptr = tptr->next) printf("%d ",tptr->data); //getch(); return 0 ; }
run
|
edit
|
history
|
help
1
piesa perdida
Quiz4
FUNCTIONS Shape functions
test
main.c
SAI_1-6.c
MyWall1
squareifnal
A141107_Potencia
C_141210_Tartaglia