Skip to content

Instantly share code, notes, and snippets.

@ternava
ternava / stars-e.c
Created October 6, 2025 08:42
Fixed the readstar() in stars-e.c
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <errno.h>
char* splitPrefix(char* s, char delimiter) {
char* nomstar = NULL;
for (char* ptr = s; *ptr != '\0';ptr++){
if (*ptr == delimiter) {
@ternava
ternava / stars-k.c
Created October 5, 2025 21:07
The fixed program of stars.c
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
char *splitPrefix(char *s, char delimiter){
for(char *i = s;*i != '\0';i++)
if(*i == delimiter){
*i = '\0';