Compare commits
No commits in common. "2025-examples" and "2025-community" have entirely different histories.
2025-examp
...
2025-commu
@ -1,8 +0,0 @@
|
|||||||
when:
|
|
||||||
- event: [push, pull_request, manual]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: build
|
|
||||||
image: masscollabs/build-essential:latest
|
|
||||||
commands:
|
|
||||||
- make
|
|
11
ChangeLog
11
ChangeLog
@ -1,14 +1,3 @@
|
|||||||
2025-03-21 Mert Gör <mertgor@masscollabs.xyz>
|
|
||||||
|
|
||||||
* c-basic/CSD-C-Basic-Book/C.pdf: printf fonksiyonunda hem float hem de double türleri %f ile yazdırılır. Ancak scanf fonksiyonunda float %f ile,
|
|
||||||
double %lf ile okunur. Örneğin: sayfa 21
|
|
||||||
|
|
||||||
2025-03-18 Mert Gör <mertgor@masscollabs.xyz>
|
|
||||||
|
|
||||||
* c-basic/CSD-C-Basic-Book/C.pdf: sayfa 21 printf fonksiyonundaki format karakterleri scanf fonksiyonunda klavyeden girişi belirlemektedir. Yani örneğin biz
|
|
||||||
pir int değeri printf ile %x kullanarak yazdırırsak bu değer 16'lık sistemde ekrana yazdırılır. Fakat bir int değeri
|
|
||||||
scanf ile %x ile okumak istersek klavyeden yaptığımız girişin 16'lık sistemde olduğu kabul edilir. Örneğin:
|
|
||||||
|
|
||||||
2025-03-08 Mert Gör <mertgor@masscollabs.xyz>
|
2025-03-08 Mert Gör <mertgor@masscollabs.xyz>
|
||||||
|
|
||||||
* UNIX-Linux/Unix-Linux-SysProg.pdf: Hızlıca incelendi sayfa 126
|
* UNIX-Linux/Unix-Linux-SysProg.pdf: Hızlıca incelendi sayfa 126
|
||||||
|
13
Makefile
13
Makefile
@ -1,13 +0,0 @@
|
|||||||
CC = gcc
|
|
||||||
CFLAGS = -Wall -Wextra -std=c11
|
|
||||||
SRCDIR = ./c-basic
|
|
||||||
SRC = $(wildcard $(SRCDIR)/*.c)
|
|
||||||
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)
|
|
13278
c-basic/CSD-C-Basic-Book/C.txt
Normal file
13278
c-basic/CSD-C-Basic-Book/C.txt
Normal file
File diff suppressed because it is too large
Load Diff
29
c-basic/CSD-C-Basic-Book/CSD-C-KaanAslan-links.txt
Normal file
29
c-basic/CSD-C-Basic-Book/CSD-C-KaanAslan-links.txt
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
1 - What is UNIX ? What does it mean ?
|
||||||
|
|
||||||
|
https://en.wikipedia.org/wiki/Unix
|
||||||
|
https://en.wikipedia.org/wiki/Unix#:~:text=In%201970%2C%20the%20group%20coined,of%20the%20final%20spelling%20Unix.
|
||||||
|
|
||||||
|
2 - When was the first UNIX developed and which hardware was the first platform for the UNIX.
|
||||||
|
|
||||||
|
https://en.wikipedia.org/wiki/History_of_Unix
|
||||||
|
https://www.britannica.com/technology/UNIX
|
||||||
|
https://www.redhat.com/en/blog/unix-linux-history
|
||||||
|
|
||||||
|
3 - What is B programming language and also C programming language ?
|
||||||
|
|
||||||
|
https://en.wikipedia.org/wiki/B_(programming_language)
|
||||||
|
https://en.wikipedia.org/wiki/C_(programming_language)
|
||||||
|
|
||||||
|
4 - What is a "personal computer"(PC) ?
|
||||||
|
|
||||||
|
https://en.wikipedia.org/wiki/Personal_computer
|
||||||
|
|
||||||
|
Merhaba arkadaşlar
|
||||||
|
|
||||||
|
Bugünkü çalışmamızda kaynak toplama hakkında nasıl yol alabileceğimizi göstermek istiyorum.
|
||||||
|
|
||||||
|
Kaan Aslan hocamız C dilini UNIX işletim sistemiyle bağlantılı olarak anlatmış ve UNIX işletim sisteminin doğuşu ile bağlantılı olarak tasvir etmiştir.
|
||||||
|
|
||||||
|
Wikipedia ve diğer kaynaklardan yararlanıp bilgilerimizi zenginleştireceğiz.
|
||||||
|
|
||||||
|
Teşekkürler.
|
12
c-basic/cli_arg.c
Normal file
12
c-basic/cli_arg.c
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < argc; ++i)
|
||||||
|
|
||||||
|
printf("%s\n", argv[i]);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
27
c-basic/do_while_example_01.c
Normal file
27
c-basic/do_while_example_01.c
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <ncurses.h>
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
char ch;
|
||||||
|
|
||||||
|
do
|
||||||
|
{
|
||||||
|
|
||||||
|
printf("(e)vet/(h)ayir?");
|
||||||
|
|
||||||
|
ch = getch();
|
||||||
|
printf("%c\n", ch);
|
||||||
|
} while (ch != 'e' && ch != 'h');
|
||||||
|
|
||||||
|
if (ch == 'e')
|
||||||
|
|
||||||
|
printf("evet secildi\n");
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
printf("hayir secildi\n");
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
16
c-basic/double_example_01.c
Normal file
16
c-basic/double_example_01.c
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
double a,b,c;
|
||||||
|
printf("enter double number a:\n");
|
||||||
|
scanf("%lf", &a);
|
||||||
|
printf("enter double number b:\n");
|
||||||
|
scanf("%lf", &b);
|
||||||
|
|
||||||
|
c = a + b;
|
||||||
|
|
||||||
|
printf("%f", c);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
@ -1,17 +0,0 @@
|
|||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
int my_float()
|
|
||||||
{
|
|
||||||
float f;
|
|
||||||
double d;
|
|
||||||
|
|
||||||
printf("float :");
|
|
||||||
scanf("%f", &f);
|
|
||||||
|
|
||||||
printf("double :");
|
|
||||||
scanf("%lf", &d);
|
|
||||||
|
|
||||||
printf("f = %f, d = %f", f, d);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
@ -1,8 +0,0 @@
|
|||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
int foo()
|
|
||||||
{
|
|
||||||
printf("I am foo\n");
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
11
c-basic/for_example_01.c
Normal file
11
c-basic/for_example_01.c
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main(void){
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < 10; ++i)
|
||||||
|
printf("%d\n", i);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
}
|
@ -1,8 +1,8 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
int hello()
|
int main()
|
||||||
{
|
{
|
||||||
printf("Hello C Programming Language 2025 Examples\n");
|
printf("Hello World !\n");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
int hex_scan()
|
|
||||||
{
|
|
||||||
|
|
||||||
int a;
|
|
||||||
|
|
||||||
printf("Enter a number : ");
|
|
||||||
|
|
||||||
scanf("%x", &a);
|
|
||||||
|
|
||||||
printf("a = %d\n", a);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
@ -1,16 +0,0 @@
|
|||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
#ifndef HEX_READ_SCANF_H
|
|
||||||
#define HEX_READ_SCANF_H
|
|
||||||
|
|
||||||
extern void hex_scan();
|
|
||||||
|
|
||||||
#endif // HEX_READ_SCANF_H
|
|
||||||
|
|
||||||
int main()
|
|
||||||
{
|
|
||||||
|
|
||||||
hex_scan();
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
@ -1,12 +0,0 @@
|
|||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
int print_example()
|
|
||||||
{
|
|
||||||
int a = 10, b = 20;
|
|
||||||
|
|
||||||
printf("a = %d, b = %d\n", a, b);
|
|
||||||
printf("a ? = %d, b ? = %d\n", b , a);
|
|
||||||
printf("%d%d\n", a, b);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
@ -1,20 +0,0 @@
|
|||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
int print_with_scan()
|
|
||||||
{
|
|
||||||
int a , b ;
|
|
||||||
|
|
||||||
printf("enter a number\n");
|
|
||||||
scanf("%d", &a);
|
|
||||||
|
|
||||||
printf("enter b number\n");
|
|
||||||
scanf("%d", &b);
|
|
||||||
|
|
||||||
printf("a is %d\n", a);
|
|
||||||
printf("b is %d\n", b);
|
|
||||||
|
|
||||||
printf("a is %d b is %d\n", a, b);
|
|
||||||
printf("b is %d a is %d\n", b, a);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
12
c-basic/putchar.c
Normal file
12
c-basic/putchar.c
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <ncurses.h>
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
char ch;
|
||||||
|
|
||||||
|
while ((ch = getch()) != 'q')
|
||||||
|
putchar(ch);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
@ -1,12 +0,0 @@
|
|||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
int my_scan()
|
|
||||||
{
|
|
||||||
int a;
|
|
||||||
|
|
||||||
printf("enter the a number:");
|
|
||||||
scanf("%d", &a);
|
|
||||||
printf("a number is : %d\n", a);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
@ -1,12 +1,12 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
int scan_two_numbers()
|
int main()
|
||||||
{
|
{
|
||||||
int a, b;
|
int a;
|
||||||
|
int b;
|
||||||
|
|
||||||
printf("enter two numbers:");
|
printf("Enter two numbers:\n");
|
||||||
scanf("%d%d", &a, &b);
|
scanf("%d%d", &a, &b);
|
||||||
|
|
||||||
printf("a = %d, b = %d\n", a, b);
|
printf("a = %d, b = %d\n", a, b);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
15
c-basic/scanf_example_02.c
Normal file
15
c-basic/scanf_example_02.c
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
int a;
|
||||||
|
int b;
|
||||||
|
|
||||||
|
printf("Enter number a:\n");
|
||||||
|
scanf("%d", &a);
|
||||||
|
printf("Enter number b:\n");
|
||||||
|
scanf("%d", &b);
|
||||||
|
printf("a = %d, b = %d\n", a, b);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
@ -1,13 +0,0 @@
|
|||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
int addition()
|
|
||||||
{
|
|
||||||
int a , b , c;
|
|
||||||
|
|
||||||
a = 10;
|
|
||||||
b = 20;
|
|
||||||
c = a + b;
|
|
||||||
printf("C = %d", c);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
12
c-basic/while_example_01.c
Normal file
12
c-basic/while_example_01.c
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
int i = 0;
|
||||||
|
|
||||||
|
while (i < 10) {
|
||||||
|
printf("%d\n", i);
|
||||||
|
++i;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
13
c-basic/while_example_02.c
Normal file
13
c-basic/while_example_02.c
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
int i = 10;
|
||||||
|
|
||||||
|
while (i) {
|
||||||
|
printf("%d\n", i);
|
||||||
|
--i;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user