What do you want to save?
Add Code snippet
New code examples
-
Other 2022-03-17 10:10:41
queue with linked list in c
/* * Program : Queue using linked list * Language : C */ #include<stdio.h> #include<stdlib.h> struct node { int data; struct node *next; }; struct node *front = NULL, *rear = NULL; void enqueue(int val) { struct node *newNo... Add solution -
C 2022-03-07 10:00:01
Linked List Program in C
typedef struct node{ int value; //this is the value the node stores struct node *next; //this is the node the current node points to. this is how the nodes link }node; node *createNode(int val){ node *newNode = malloc(sizeof(node)); newNo... Add solution -
Other 2022-03-01 05:35:04
double pointer malloc in c
char *x; // Memory locations pointed to by x contain 'char' char **y; // Memory locations pointed to by y contain 'char*' x = (char*)malloc(sizeof(char) * 100); // 100 'char' y = (char**)malloc(sizeof(char*) * 100); // 100 'char*' // below is incorre... Add solution -
C++ 2022-02-16 02:30:33
void *malloc( size_t size ) { //do your stuf here return ::malloc(size); }
/* malloc example: random string generator*/ #include <stdio.h> /* printf, scanf, NULL */ #include <stdlib.h> /* malloc, free, rand */ int main () { int i,n; char * buffer; printf ("How long do you want the string? "... Add solution