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
Reverse.CPP
C_141211_OrdenarArrayConFunciones
C_141113_VariosPerfectos
Hello
Tern operators
Taco practice
2-D array
to find a number is even or not
B_141209_EsPrimo
swipe the numbers in cyclic way