#include <stdlib.h>#include <stdio.h>int main(void){ int* p = NULL; struct S *s = NULL; void(*f)(int, double) = NULL; char *ptr = malloc(15); if (ptr == NULL) printf("Out of memory"); free(ptr);}
#include <stdio.h>struct p{ struct p *next; int x;};int main(){ struct p *p1 = (struct p*)malloc(sizeof(struct p)); p1->x = 1; p1->next = (struct p*)malloc(sizeof(struct p)); return 0;}
struct node{ struct node *left; struct node *centre; struct node *right;};
#include <stdio.h>int main(){ char *str = "This" //Line 1 char *ptr = "Program\n"; //Line 2 str = ptr; //Line 3 printf("%s, %s\n", str, ptr); //Line 4}
struct temp{ int a : 1; int b : 2; int c : 4; int d : 4;}s;