오늘 개지랄난 정보처리기사 시험

#include <stdio.h>

#include <stdlib.h>

struct node {

int value;

struct node* next;

};

// 앞에 노드 추가

struct node* add(struct node* head, int value) {

struct node* new_node = (struct node*)malloc(sizeof(struct node));

new_node->value = value;

new_node->next = head;

return new_node;

}

struct node *func(struct node *head, int x){

struct node *prev;

struct node * cur = head;

for(cur; cur->vaule != x; cur = cur->next){

prev = cur;

prev->next = cur->next

}

if(){}

cur->next = head

return cur;

}

int main() {

struct node* head = NULL;

for (int i = 1; i <= 5; i++) head = add(head, i); // 리스트: 5 4 3 2 1

struct node* cur = func(head, 3); // 3부터 시작

for (cur=head; cur; cur = cur->next) {

printf("%d", cur->value);

}

return 0;

}

이게 오늘 2025년 5점짜리 문제
이건 2021년 문제 같은 5점이다 ㅋㅋㅋㅋㅋ
1745123669-1.jpg 오늘 개지랄난 정보처리기사 시험

출제위원  나한테 왜그래요?