#include #include typedef struct Node { int data; struct Node* next; } Node; void printEverySecond(Node* head, int position) { if (head == NULL) { return; } if (position % 2 == 1) { printf("%d ", head->data); } printEverySecond(head->next, position + 1); } // Helper to create a node Node* createNode(int data) { Node* newNode = (Node*)malloc(sizeof(Node)); newNode->data = data; newNode->next = NULL; return newNode; } int main() { Node* head = createNode(1); head->next = createNode(2); head->next->next = createNode(3); head->next->next->next = createNode(4); head->next->next->next->next = createNode(5); printf("Every second item: "); printEverySecond(head, 1); printf("\n"); // Free memory Node* tmp; while (head) { tmp = head; head = head->next; free(tmp); } return 0; }