changed code removed main from each file
All checks were successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/manual/build Pipeline was successful

This commit is contained in:
Mert Gör 🇹🇷 2025-04-12 22:53:01 +03:00
parent 9a2eabf5cf
commit 97d77a3ff6
Signed by: mertgor
GPG key ID: 03E547D043AB6C8F
11 changed files with 19 additions and 23 deletions

View file

@ -2,16 +2,12 @@ CC = gcc
CFLAGS = -Wall -Wextra -std=c11
SRCDIR = ./c-basic
SRC = $(wildcard $(SRCDIR)/*.c)
OBJ = $(SRC:.c=.o)
OBJ = $(patsubst $(SRCDIR)/%.c, $(SRCDIR)/%.o, $(SRC))
TARGET = main
all: $(TARGET)
$(TARGET): $(OBJ)
$(CC) $(CFLAGS) -o $@ $^
$(SRCDIR)/%.o: $(SRCDIR)/%.c
$(CC) $(CFLAGS) -c $< -o $@
clean:
rm -f $(OBJ) $(TARGET)

View file

@ -1,6 +1,6 @@
#include <stdio.h>
int main()
int my_float()
{
float f;
double d;

View file

@ -6,9 +6,3 @@ int foo()
return 0;
}
int main()
{
foo();
return 0;
}

View file

@ -1,6 +1,6 @@
#include <stdio.h>
int main()
int hello()
{
printf("Hello C Programming Language 2025 Examples");

View file

@ -3,7 +3,7 @@
int hex_scan()
{
int a, b;
int a;
printf("Enter a number : ");

View file

@ -1,5 +1,11 @@
#include <stdio.h>
#include "hex_read_scanf.c"
#ifndef HEX_READ_SCANF_H
#define HEX_READ_SCANF_H
extern void hex_scan();
#endif // HEX_READ_SCANF_H
int main()
{

View file

@ -1,6 +1,6 @@
#include <stdio.h>
int main()
int print_example()
{
int a = 10, b = 20;

View file

@ -1,6 +1,6 @@
#include <stdio.h>
int main()
int print_with_scan()
{
int a , b ;

View file

@ -1,6 +1,6 @@
#include <stdio.h>
int main()
int my_scan()
{
int a;

View file

@ -1,6 +1,6 @@
#include <stdio.h>
int main()
int scan_two_numbers()
{
int a, b;

View file

@ -1,6 +1,6 @@
#include <stdio.h>
int main()
int addition()
{
int a , b , c;