↓↑ Program 1#include<stdlib.h> struct node { int x; struct node *next; }; int main() { /* This will be the unchanging first node */ struct node *root; /* Now root points to a node struct */ root = (struct node *) malloc( sizeof(struct node) ); /* The node root points to has its next pointer equal to a null pointer set */ root->next = 0; /* By using the -> operator, you can modify what the node, a pointer, (root in this case) points to. */ root->x = 5; }
Saturday, May 16, 2020
Array, Pointer Programs .
Subscribe to:
Post Comments (Atom)
Array, Pointer Programs .
↓↑ Program 1 #include<stdlib.h> struct node { int x; struct node *next; }; int main() { /* This will be the unchanging f...
-
Permutations of string ABC are ABC, ACB, BAC, BCA, CBA, CAB Recurcive program to genrate permutation of String [ ABC ] ******************* ...
-
↓↑ Program 1 #include<stdlib.h> struct node { int x; struct node *next; }; int main() { /* This will be the unchanging f...
No comments:
Post a Comment