Post

Many people have asked me how I test coding capabilities of LLMs Here I have given 4 prompts to check C code generation of LLMs that you can try yourself I have also given some additional details of reasons for these tests 1/🧵 #ChatGPT #GeminiAI #LLMs

1 repost13 likes

Prompt 1: Implementing a Sorting Algorithm "Write a C function to sort an array of integers in ascending order using the quicksort algorithm. Include comments to explain the code." 2/🧵

Prompt 2: Linked List Operations "Implement the following functions for a singly linked list of integers in C: insert_node_at_end(struct Node** head, int data): Insert a new node with the given data at the end of the list. 3.1/🧵

delete_node_by_value(struct Node** head, int value): Delete the first node containing the given value in the list. print_list(struct Node* head): Print the contents of the list." 3.2/🧵

Prompt 3: File Input/Output "Write a C program that reads a comma-separated text file containing student names and grades. Calculate the average grade and write the following to a new file: A list of students whose grades are above average. The overall class average." 4/🧵