Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ $(BUILD)/llms.txt: $(CHAPTERS) glossary.md $(BUILD)/questions.md tools/llms.py t
.PHONY: all fetch lint check-code exercises check clean
fetch:
mkdir -p sources/slides/2026 sources/hw/2023 sources/hw/2024 sources/hw/2025
for f in lec00 lec01 lec02; do curl -fsSL -o sources/slides/2026/$$f.pdf https://progintro.github.io/assets/pdf/$$f.pdf; done
for f in lec00 lec01 lec02 lec03; do curl -fsSL -o sources/slides/2026/$$f.pdf https://progintro.github.io/assets/pdf/$$f.pdf; done
gh release download 2025 -R $(REPO) -D sources/slides -p 'lec*.pdf' -p make.pdf --skip-existing
gh release download 2025 -R $(REPO) -D sources/hw/2025 -p 'hw*.pdf' -p stergios.pdf --skip-existing
gh release download 2024 -R $(REPO) -D sources/hw/2024 -p 'hw*.pdf' --skip-existing
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ chatbot ή agent το [`llms-full.txt`](llms-full.txt) (όλος ο οδηγός

Ο οδηγός γράφτηκε από τις διαφάνειες των διαλέξεων του 2025-26
([progintro.github.io](https://progintro.github.io/)) και ενημερώνεται με τις διαφάνειες
του 2026-27 καθώς δημοσιεύονται (ως τώρα: Διαλέξεις 0–2), τις
του 2026-27 καθώς δημοσιεύονται (ως τώρα: Διαλέξεις 0–3), τις
[σημειώσεις](https://progintro.github.io/notes/) του μαθήματος, τα
[εργαστήρια](https://progintro.github.io/lab-material/) και τα θέματα εξετάσεων και τις
εργασίες προηγούμενων ετών. Οι ασκήσεις έχουν υποδείξεις αλλά όχι λύσεις.
Expand Down
10 changes: 5 additions & 5 deletions chapters/03-functions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ layout: chapter
chapter: 3
lecture: 3
title: "Συναρτήσεις"
date: 2025-10-10
date: 2026-10-09
part: B
slides: https://github.com/progintro/progintro.github.io/releases/download/2025/lec03.pdf
slides: https://progintro.github.io/assets/pdf/lec03.pdf
prev: 02-memory-variables
next: 04-git-operators
topics: [functions, types, variables, integer-representation, input-output, compilation]
Expand Down Expand Up @@ -586,7 +586,7 @@ Pi is approximately: 3.141583

## Διάβασμα

- **Διαφάνειες:** [Διάλεξη 3](https://github.com/progintro/progintro.github.io/releases/download/2025/lec03.pdf), σελ. 1–47. Τύποι, ανάθεση, υπερχείλιση: σελ. 5–9· `printf`, ακολουθίες διαφυγής, προσδιοριστικά: σελ. 10–12· συμμετρία και μηνύματα λάθους: σελ. 13–14· δηλώσεις και δεσμευμένες λέξεις: σελ. 15–16· μεταγλώττιση και ανάλυση του Hello World: σελ. 17–27· συναρτήσεις: σελ. 28–37· pair programming και challenges: σελ. 38–44.
- **Διαφάνειες:** [Διάλεξη 3](https://progintro.github.io/assets/pdf/lec03.pdf) (2026-27), σελ. 1–48. Τύποι, ανάθεση, υπερχείλιση: σελ. 5–9· `printf`, ακολουθίες διαφυγής, προσδιοριστικά: σελ. 10–12· συμμετρία και μηνύματα λάθους: σελ. 13–14· δηλώσεις και δεσμευμένες λέξεις: σελ. 15–16· μεταγλώττιση και ανάλυση του Hello World: σελ. 17–27· συναρτήσεις: σελ. 28–37· pair programming και challenges: σελ. 38–45. Οι διαφάνειες του 2025-26 (μία σελίδα λιγότερη: από τη σελ. 40 και μετά η αρίθμηση είναι κατά μία μικρότερη): [Διάλεξη 3 (2025)](https://github.com/progintro/progintro.github.io/releases/download/2025/lec03.pdf).
- **Σημειώσεις:** οι διαφάνειες συνιστούν να έχετε καλύψει τις σημειώσεις του κ. Σταματόπουλου μέχρι τη σελίδα 35, και τις σελίδες 58–71. Συγκεκριμένα για αυτή τη διάλεξη:
- [Κεφάλαιο 1: Πρώτα προγράμματα σε C](https://progintro.github.io/notes/chapters/01-first-programs/), ενότητες «Καλημέρα κόσμε της C» και «Πόσο είναι το $\pi$;» (K04, σελ. 19–23)
- [Κεφάλαιο 2: Μεταβλητές, τύποι, τελεστές και παραστάσεις](https://progintro.github.io/notes/chapters/02-types-operators/), ενότητα «Μεταβλητές, σταθερές, τύποι και δηλώσεις στην C» (K04, σελ. 30–33)
Expand Down Expand Up @@ -671,8 +671,8 @@ Pi is approximately: 3.141583
- <a id="a3-1"></a>**[Α3.1](../../questions/slides/slides-lec03-function-call.md)** Τιμή μετά από κλήση συνάρτησης: Διάλεξη 3: Συναρτήσεις, διαφάνεια 37 · ★☆☆ · trace · `slides-lec03-function-call`
- <a id="a3-2"></a>**[Α3.2](../../questions/slides/slides-lec03-int-size.md)** Πόσα bytes είναι ένας int;: Διάλεξη 3: Συναρτήσεις, διαφάνεια 9 · ★☆☆ · short-answer · `slides-lec03-int-size`
- <a id="a3-3"></a>**[Α3.3](../../questions/slides/slides-lec03-power-outage.md)** Διακοπή ρεύματος και μνήμη: Διάλεξη 3: Συναρτήσεις, διαφάνεια 3 · ★☆☆ · multiple-choice · `slides-lec03-power-outage`
- <a id="a3-4"></a>**[Α3.4](../../questions/slides/slides-lec03-pyth.md)** Πυθαγόρειο θεώρημα (pyth.c): Διάλεξη 3: Συναρτήσεις, διαφάνεια 40 · ★☆☆ · programming · `slides-lec03-pyth`
- <a id="a3-5"></a>**[Α3.5](../../questions/slides/slides-lec03-leibniz-pi.md)** Προσέγγιση του π με τη σειρά Leibniz: Διάλεξη 3: Συναρτήσεις, διαφάνεια 43 · ★★☆ · programming · `slides-lec03-leibniz-pi`
- <a id="a3-4"></a>**[Α3.4](../../questions/slides/slides-lec03-pyth.md)** Πυθαγόρειο θεώρημα (pyth.c): Διάλεξη 3: Συναρτήσεις, διαφάνεια 41 · ★☆☆ · programming · `slides-lec03-pyth`
- <a id="a3-5"></a>**[Α3.5](../../questions/slides/slides-lec03-leibniz-pi.md)** Προσέγγιση του π με τη σειρά Leibniz: Διάλεξη 3: Συναρτήσεις, διαφάνεια 44 · ★★☆ · programming · `slides-lec03-leibniz-pi`
- <a id="a3-6"></a>**[Α3.6](../../questions/slides/slides-lec03-overflow.md)** Υπερχείλιση ακεραίων: Διάλεξη 3: Συναρτήσεις, διαφάνεια 8 · ★★☆ · trace · `slides-lec03-overflow`

### Εργαστήριο (Α3.7)
Expand Down
2 changes: 1 addition & 1 deletion chapters/06-control-flow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ echo -e "2856\n0\nf\n" | ./aliquot | ttyplot
### Σχετικές ασκήσεις από άλλα κεφάλαια

- **[Α2.11](../../questions/labs/lab-lab04-printchar.md)** Εκτύπωση χαρακτήρων: Εργαστήριο 4, Άσκηση 1 · ★☆☆ · programming · `lab-lab04-printchar`
- **[Α3.5](../../questions/slides/slides-lec03-leibniz-pi.md)** Προσέγγιση του π με τη σειρά Leibniz: Διάλεξη 3: Συναρτήσεις, διαφάνεια 43 · ★★☆ · programming · `slides-lec03-leibniz-pi`
- **[Α3.5](../../questions/slides/slides-lec03-leibniz-pi.md)** Προσέγγιση του π με τη σειρά Leibniz: Διάλεξη 3: Συναρτήσεις, διαφάνεια 44 · ★★☆ · programming · `slides-lec03-leibniz-pi`
- **[Α5.9](../../questions/exams/exam-2025-jan-q1.md)** Mystery: Εξέταση Ιανουαρίου 2025, Θέμα 1 · ★☆☆ · trace · `exam-2025-jan-q1`
- **[Α5.10](../../questions/exams/exam-2026-jan-q1.md)** Mystery: Εξέταση Ιανουαρίου 2026, Θέμα 1 · ★☆☆ · trace · `exam-2026-jan-q1`
- **[Α5.11](../../questions/exams/exam-2026-jun-q1.md)** Η συνάρτηση mystery: Εξέταση Ιουνίου 2026, Θέμα 1 · ★☆☆ · trace · `exam-2026-jun-q1`
Expand Down
4 changes: 2 additions & 2 deletions questions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@
- **[Α3.1](../questions/slides/slides-lec03-function-call.md)** Τιμή μετά από κλήση συνάρτησης: Διάλεξη 3: Συναρτήσεις, διαφάνεια 37 · ★☆☆ · trace · `slides-lec03-function-call`
- **[Α3.2](../questions/slides/slides-lec03-int-size.md)** Πόσα bytes είναι ένας int;: Διάλεξη 3: Συναρτήσεις, διαφάνεια 9 · ★☆☆ · short-answer · `slides-lec03-int-size`
- **[Α3.3](../questions/slides/slides-lec03-power-outage.md)** Διακοπή ρεύματος και μνήμη: Διάλεξη 3: Συναρτήσεις, διαφάνεια 3 · ★☆☆ · multiple-choice · `slides-lec03-power-outage`
- **[Α3.4](../questions/slides/slides-lec03-pyth.md)** Πυθαγόρειο θεώρημα (pyth.c): Διάλεξη 3: Συναρτήσεις, διαφάνεια 40 · ★☆☆ · programming · `slides-lec03-pyth`
- **[Α3.5](../questions/slides/slides-lec03-leibniz-pi.md)** Προσέγγιση του π με τη σειρά Leibniz: Διάλεξη 3: Συναρτήσεις, διαφάνεια 43 · ★★☆ · programming · `slides-lec03-leibniz-pi`
- **[Α3.4](../questions/slides/slides-lec03-pyth.md)** Πυθαγόρειο θεώρημα (pyth.c): Διάλεξη 3: Συναρτήσεις, διαφάνεια 41 · ★☆☆ · programming · `slides-lec03-pyth`
- **[Α3.5](../questions/slides/slides-lec03-leibniz-pi.md)** Προσέγγιση του π με τη σειρά Leibniz: Διάλεξη 3: Συναρτήσεις, διαφάνεια 44 · ★★☆ · programming · `slides-lec03-leibniz-pi`
- **[Α3.6](../questions/slides/slides-lec03-overflow.md)** Υπερχείλιση ακεραίων: Διάλεξη 3: Συναρτήσεις, διαφάνεια 8 · ★★☆ · trace · `slides-lec03-overflow`

### Εργαστήριο (Α3.7)
Expand Down
4 changes: 2 additions & 2 deletions questions/slides/slides-lec03-function-call.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ kind: slides
title: "Τιμή μετά από κλήση συνάρτησης"
source:
title: "Διάλεξη 3: Συναρτήσεις, διαφάνεια 37"
url: https://github.com/progintro/progintro.github.io/releases/download/2025/lec03.pdf
years: [2025]
url: https://progintro.github.io/assets/pdf/lec03.pdf
years: [2025, 2026]
chapters: [3]
topics: [functions]
difficulty: 1
Expand Down
4 changes: 2 additions & 2 deletions questions/slides/slides-lec03-int-size.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ kind: slides
title: "Πόσα bytes είναι ένας int;"
source:
title: "Διάλεξη 3: Συναρτήσεις, διαφάνεια 9"
url: https://github.com/progintro/progintro.github.io/releases/download/2025/lec03.pdf
years: [2025]
url: https://progintro.github.io/assets/pdf/lec03.pdf
years: [2025, 2026]
chapters: [3]
topics: [types]
difficulty: 1
Expand Down
6 changes: 3 additions & 3 deletions questions/slides/slides-lec03-leibniz-pi.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ id: slides-lec03-leibniz-pi
kind: slides
title: "Προσέγγιση του π με τη σειρά Leibniz"
source:
title: "Διάλεξη 3: Συναρτήσεις, διαφάνεια 43"
url: https://github.com/progintro/progintro.github.io/releases/download/2025/lec03.pdf
years: [2025]
title: "Διάλεξη 3: Συναρτήσεις, διαφάνεια 44"
url: https://progintro.github.io/assets/pdf/lec03.pdf
years: [2025, 2026]
chapters: [3, 6]
topics: [floating-point, loops, math-algorithms]
difficulty: 2
Expand Down
4 changes: 2 additions & 2 deletions questions/slides/slides-lec03-overflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ kind: slides
title: "Υπερχείλιση ακεραίων"
source:
title: "Διάλεξη 3: Συναρτήσεις, διαφάνεια 8"
url: https://github.com/progintro/progintro.github.io/releases/download/2025/lec03.pdf
years: [2025]
url: https://progintro.github.io/assets/pdf/lec03.pdf
years: [2025, 2026]
chapters: [3]
topics: [integer-representation, types, input-output]
difficulty: 2
Expand Down
6 changes: 3 additions & 3 deletions questions/slides/slides-lec03-pyth.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ id: slides-lec03-pyth
kind: slides
title: "Πυθαγόρειο θεώρημα (pyth.c)"
source:
title: "Διάλεξη 3: Συναρτήσεις, διαφάνεια 40"
url: https://github.com/progintro/progintro.github.io/releases/download/2025/lec03.pdf
years: [2025]
title: "Διάλεξη 3: Συναρτήσεις, διαφάνεια 41"
url: https://progintro.github.io/assets/pdf/lec03.pdf
years: [2025, 2026]
chapters: [3]
topics: [functions, floating-point, compilation]
difficulty: 1
Expand Down
36 changes: 20 additions & 16 deletions sources/extract/lec03.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
lecture: 3
pages: 47
year: 2026-27 # updated from the 2025-26 deck (47 pages) on 2026-10-09; p. 40 is new, so 2025 pp. 40-47 are now pp. 41-48
slides: https://progintro.github.io/assets/pdf/lec03.pdf
pages: 48
outline:
- {pages: "1-5", section: "Τύποι μεταβλητών"}
- {pages: "6-7", section: "Ανάθεση σε μεταβλητή"}
Expand All @@ -17,33 +19,35 @@ outline:
- {pages: "32-36", section: "Συναρτήσεις στη C: ορισμός"}
- {pages: "37", section: "Κλήση συνάρτησης"}
- {pages: "38-39", section: "Pair programming"}
- {pages: "40-44", section: "Pair programming"} # challenges; worked in «Παραδείγματα»
- {pages: "45-47", section: "Pair programming"} # Kahoot, reading list, closing
- {pages: "40", section: "Pair programming"} # live demo: «Χρειάζομαι 2-3 εθελοντές/ντριες» + ssh to a demo host
- {pages: "41-45", section: "Pair programming"} # challenges; worked in «Παραδείγματα»
- {pages: "46-48", section: "Pair programming"} # Kahoot, reading list, closing
pointers:
- {page: 8, text: "Wikipedia: Integer overflow (https://en.wikipedia.org/wiki/Integer_overflow)"}
- {page: 12, text: "printf reference, «πλήρης λίστα εδώ» (https://cplusplus.com/reference/cstdio/printf/)"}
- {page: 18, text: "Wikipedia: GNU Compiler Collection (https://en.wikipedia.org/wiki/GNU_Compiler_Collection)"}
- {page: 30, text: "Mermaid live editor link for the g(x,y,z) diagram (https://mermaid.live/...)"}
- {page: 38, text: "Wikipedia: Software development, Computer programmer, Source code, Code review"}
- {page: 39, text: "Jeff Dean quote (https://www.brainyquote.com/authors/jeff-dean-quotes)"}
- {page: 40, text: "pyth.c (same exercise as lab02 Άσκηση 2, pyth.c)"}
- {page: 46, text: "Σημειώσεις κ. Σταματόπουλου: όλα μέχρι τη σελίδα 35 + σελίδες 58-71 (K04)"}
- {page: 46, text: "Wikipedia: Escape sequences in C (https://en.wikipedia.org/wiki/Escape_sequences_in_C)"}
- {page: 46, text: "printf tips (https://web.mit.edu/10.001/Web/Course_Notes/c_Notes/tips_printf.html) and reference (https://cplusplus.com/reference/cstdio/printf/)"}
- {page: 46, text: "Ubuntu command line tutorial (https://ubuntu.com/tutorials/command-line-for-beginners#1-overview)"}
- {page: 41, text: "pyth.c (same exercise as lab02 Άσκηση 2, pyth.c)"}
- {page: 47, text: "Σημειώσεις κ. Σταματόπουλου: όλα μέχρι τη σελίδα 35 + σελίδες 58-71 (K04)"}
- {page: 47, text: "Wikipedia: Escape sequences in C (https://en.wikipedia.org/wiki/Escape_sequences_in_C)"}
- {page: 47, text: "printf tips (https://web.mit.edu/10.001/Web/Course_Notes/c_Notes/tips_printf.html) and reference (https://cplusplus.com/reference/cstdio/printf/)"}
- {page: 47, text: "Ubuntu command line tutorial (https://ubuntu.com/tutorials/command-line-for-beginners#1-overview)"}
takeaways_slide: 27
issues:
- "p. 2 (announcements: hw0 next week, list of useful shell commands, pipe and redirect) is course logistics / review of lecture 1; not turned into theory."
- "p. 3 is a Kahoot review question from lecture 2 (volatile vs secondary memory); written as slides-lec03-power-outage with chapters [3, 2]."
- "p. 2 (announcements: in 2026-27 hw0 is released after the lecture, submitted through hw.uoa.gr, deadline Wednesday 2026/11/04 23:59; list of useful shell commands, pipe and redirect) is course logistics / review of lecture 1; not turned into theory."
- "p. 3 of the 2025-26 deck is a Kahoot review question from lecture 2 (volatile vs secondary memory); written as slides-lec03-power-outage with chapters [3, 2]. The 2026-27 deck replaced it with a painting, so that question still cites the 2025-26 deck."
- "p. 5: the slide lists long int as 4 bytes and unsigned long int as 4 bytes. On 64-bit Linux (the lab machines) long is 8 bytes; the chapter keeps the slide table and adds the notes' wording («συνήθως 4, μερικές φορές 8»)."
- "pp. 6-7: the memory diagram shows the int's value 42 in 'Byte 3' (big-endian style); the chapter gives the bit pattern without committing to a byte order (endianness is in chapter 12)."
- "p. 8: the slide asks 'Τι συνέβη; Πώς το διορθώνουμε;' without an answer; the fix in the chapter (long long / LL / %lld, or unsigned) and the mention of a gcc overflow warning are standard C, not quoted from the lecture."
- "p. 12: the table says %f prints float; the chapter adds that it prints double too (standard printf behaviour)."
- "p. 20: the `file a.out` output line is long; it was re-wrapped in the chapter to stay under 80 columns."
- "p. 42: the linker path in the terminal screenshot is /usr/bin/X11/ld; transcribed as shown."
- "p. 43: the slide writes the formula as 4·Σ(-1)^i/(2i+1) = 1/1 - 1/3 + ..., which is inconsistent (the left side is π, the right side π/4). The chapter and the question write π/4 = Σ ... = 1/1 - 1/3 + ..."
- "p. 44: the pi program's main has no return statement; kept as on the slide (compiles, main implicitly returns 0 in C99+)."
- "p. 45 is only 'Kahoot Time!'; the quiz questions are not in the slides, so none were transcribed."
- "p. 46: 'μέχρι την σελίδα 35 + σελίδες 58-71' interpreted as K04 pages; per k04-map.tsv these are notes chapters 00-02 up to «Εντολές αντικατάστασης, τελεστές και παραστάσεις» and pp. 58-71 = 04-functions «Δομή ενός προγράμματος C – Συναρτήσεις» through «Μετατροπές μεταξύ δεκαδικών και δυαδικών αριθμών»."
- "p. 43 (p. 42 in 2025-26): the linker path in the terminal screenshot is /usr/bin/X11/ld; transcribed as shown."
- "p. 44 (p. 43 in 2025-26): the slide writes the formula as 4·Σ(-1)^i/(2i+1) = 1/1 - 1/3 + ..., which is inconsistent (the left side is π, the right side π/4). The chapter and the question write π/4 = Σ ... = 1/1 - 1/3 + ..."
- "p. 45 (p. 44 in 2025-26): the pi program's main has no return statement; kept as on the slide (compiles, main implicitly returns 0 in C99+). The 2026-27 slide declares main(int argc, char ** argv) instead of main()."
- "p. 46 (p. 45 in 2025-26) is only 'Kahoot Time!'; the quiz questions are not in the slides, so none were transcribed."
- "p. 47 (p. 46 in 2025-26): 'μέχρι την σελίδα 35 + σελίδες 58-71' interpreted as K04 pages; per k04-map.tsv these are notes chapters 00-02 up to «Εντολές αντικατάστασης, τελεστές και παραστάσεις» and pp. 58-71 = 04-functions «Δομή ενός προγράμματος C – Συναρτήσεις» through «Μετατροπές μεταξύ δεκαδικών και δυαδικών αριθμών»."
- "Lab mapping: lab02 pyth.c is the same exercise as Challenge #1; lab05 (collatz.c 1.1-1.2) is the first lab that asks for user-defined functions. The front-matter labs are [lab02, lab05] rather than the manifest's [lab05] alone."
- "The outline maps pp. 40-47 (challenges, Kahoot, reading, closing) to 'Pair programming' since the challenges are worked in «Παραδείγματα», not in a Θεωρία H3."
- "The outline maps pp. 40-48 (demo, challenges, Kahoot, reading, closing) to 'Pair programming' since the challenges are worked in «Παραδείγματα», not in a Θεωρία H3."
- "p. 37: the 2026-27 slide says the call passes «τις παραμέτρους (ορίσματα)»; 2025-26 said «τα ορίσματά της». The chapter keeps the parameter (in the definition) vs argument (in the call) distinction."
Loading
Loading