CExperiments/XorList/main.c
Andrea Bontempi 10a9c34328 Init
2021-10-21 15:04:33 +02:00

24 lines
411 B
C

#include "list.h"
#include <stdio.h>
void powNode(struct _node* node) {
node->val = node->val * node->val;
}
int main() {
list* myList = createList();
pushAfter(myList,1);
pushAfter(myList,2);
pushAfter(myList,3);
puts("##### Lista inserita:\n");
scrollList(myList, 0, printNode);
puts("##### Calcolo il quadrato di ogni nodo:\n");
scrollList(myList, 0, powNode);
scrollList(myList, 0, printNode);
}