Compare commits
28 Commits
2025-commu
...
2025-examp
Author | SHA1 | Date | |
---|---|---|---|
7e3fed1bd5 | |||
56fa9fee35 | |||
92130c44dc | |||
97d77a3ff6 | |||
9a2eabf5cf | |||
11abe9c6c7 | |||
d6283d31cd | |||
0bb57da7ec | |||
79f83aa190 | |||
523764a45c | |||
119632d026 | |||
84c1aa6a02 | |||
c788fa919f | |||
70b12c1d28 | |||
391e29cbfd | |||
da1d77758a | |||
7b90c42e43 | |||
2255d2f5ca | |||
ffca2a7d25 | |||
dcf7552add | |||
9ad88016bb | |||
1d24d8b71c | |||
6b0ac54b46 | |||
c55c2c7c8b | |||
f202be858b | |||
b8f22cf5bd | |||
9ff74b5bf4 | |||
6de7b78d91 |
8
.woodpecker/build.yaml
Normal file
8
.woodpecker/build.yaml
Normal file
@ -0,0 +1,8 @@
|
||||
when:
|
||||
- event: [push, pull_request, manual]
|
||||
|
||||
steps:
|
||||
- name: build
|
||||
image: masscollabs/build-essential:latest
|
||||
commands:
|
||||
- make
|
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
||||
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>
|
||||
|
||||
* UNIX-Linux/Unix-Linux-SysProg.pdf: Hızlıca incelendi sayfa 126
|
||||
|
13
Makefile
Normal file
13
Makefile
Normal file
@ -0,0 +1,13 @@
|
||||
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)
|
File diff suppressed because it is too large
Load Diff
@ -1,29 +0,0 @@
|
||||
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.
|
@ -1,12 +0,0 @@
|
||||
#include <stdio.h>
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
||||
int i;
|
||||
|
||||
for (i = 0; i < argc; ++i)
|
||||
|
||||
printf("%s\n", argv[i]);
|
||||
|
||||
return 0;
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
#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;
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
#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;
|
||||
}
|
17
c-basic/float_double.c
Normal file
17
c-basic/float_double.c
Normal file
@ -0,0 +1,17 @@
|
||||
#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;
|
||||
}
|
8
c-basic/foo.c
Normal file
8
c-basic/foo.c
Normal file
@ -0,0 +1,8 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int foo()
|
||||
{
|
||||
printf("I am foo\n");
|
||||
|
||||
return 0;
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
#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>
|
||||
|
||||
int main()
|
||||
int hello()
|
||||
{
|
||||
printf("Hello World !\n");
|
||||
printf("Hello C Programming Language 2025 Examples\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
15
c-basic/hex_read_scanf.c
Normal file
15
c-basic/hex_read_scanf.c
Normal file
@ -0,0 +1,15 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int hex_scan()
|
||||
{
|
||||
|
||||
int a;
|
||||
|
||||
printf("Enter a number : ");
|
||||
|
||||
scanf("%x", &a);
|
||||
|
||||
printf("a = %d\n", a);
|
||||
|
||||
return 0;
|
||||
}
|
16
c-basic/main.c
Normal file
16
c-basic/main.c
Normal file
@ -0,0 +1,16 @@
|
||||
#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;
|
||||
}
|
12
c-basic/print_example.c
Normal file
12
c-basic/print_example.c
Normal file
@ -0,0 +1,12 @@
|
||||
#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;
|
||||
}
|
20
c-basic/print_example_with_scan.c
Normal file
20
c-basic/print_example_with_scan.c
Normal file
@ -0,0 +1,20 @@
|
||||
#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;
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
#include <stdio.h>
|
||||
#include <ncurses.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
char ch;
|
||||
|
||||
while ((ch = getch()) != 'q')
|
||||
putchar(ch);
|
||||
|
||||
return 0;
|
||||
}
|
12
c-basic/scanf_example.c
Normal file
12
c-basic/scanf_example.c
Normal file
@ -0,0 +1,12 @@
|
||||
#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,15 +0,0 @@
|
||||
#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,12 +1,12 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main()
|
||||
int scan_two_numbers()
|
||||
{
|
||||
int a;
|
||||
int b;
|
||||
int a, b;
|
||||
|
||||
printf("Enter two numbers:\n");
|
||||
printf("enter two numbers:");
|
||||
scanf("%d%d", &a, &b);
|
||||
|
||||
printf("a = %d, b = %d\n", a, b);
|
||||
|
||||
return 0;
|
13
c-basic/toplama.c
Normal file
13
c-basic/toplama.c
Normal file
@ -0,0 +1,13 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int addition()
|
||||
{
|
||||
int a , b , c;
|
||||
|
||||
a = 10;
|
||||
b = 20;
|
||||
c = a + b;
|
||||
printf("C = %d", c);
|
||||
|
||||
return 0;
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
while (i < 10) {
|
||||
printf("%d\n", i);
|
||||
++i;
|
||||
}
|
||||
return 0;
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
#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