MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / pushChar

Function pushChar

CPP/Trees/Expression_tree/Stack.c:70–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70void pushChar(CharStackList *list, char data) { // Insert At First
71 CharStackNode* newNode = malloc(sizeof(StackNode));
72 newNode->next = NULL;
73 newNode->data = data;
74
75 if(newNode == NULL) {
76 return;
77 }
78
79 if(*list == NULL) {
80 *list = newNode;
81 } else {
82 CharStackNode *firstNode = *list;
83 *list = newNode;
84 (*list)->next = firstNode;
85 }
86}
87
88char peekChar(CharStackList list) {
89 if(list == NULL)

Callers 1

convertToPostFixFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected