My issue
include <stdio.h>
include <stdlib.h>
// Define a struct for the linked list node
struct Node {
int value;
struct Node* next;
};
int main() {
// Creating head of the Linked list
struct Node* head=(struct Node*)malloc(sizeof(struct Node));
head->value = 1;
head->next = NULL;
printf(“The value at first is %d\n”, head->value);
// Don’t forget to free memory allocated for the head node
free(head);
return 0;
} the code is correct , but still this code chef platform is no accepting this code
My code
#include <stdio.h>
#include <stdlib.h>
// Define a struct for the linked list node
struct Node {
int value;
struct Node* next;
};
int main() {
// Creating head of the Linked list
struct Node* head=(struct Node*)malloc(sizeof(struct Node));
head->value = 1;
head->next = NULL;
printf("The value at first is %d\n", head->value);
// Don’t forget to free memory allocated for the head node
free(head);
return 0;
}
Learning course: Data structures & Algorithms lab
Problem Link: https://www.codechef.com/learn/course/muj-dsa-c/MUJDSAC10/problems/LINK01P01