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 lec03 lec04 lec05 lec06 lec07 lec08 lec09; 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 lec04 lec05 lec06 lec07 lec08 lec09 lec10; 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–9), τις
του 2026-27 καθώς δημοσιεύονται (ως τώρα: Διαλέξεις 0–10), τις
[σημειώσεις](https://progintro.github.io/notes/) του μαθήματος, τα
[εργαστήρια](https://progintro.github.io/lab-material/) και τα θέματα εξετάσεων και τις
εργασίες προηγούμενων ετών. Οι ασκήσεις έχουν υποδείξεις αλλά όχι λύσεις.
Expand Down
23 changes: 18 additions & 5 deletions chapters/10-arrays/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ layout: chapter
chapter: 10
lecture: 10
title: "Πίνακες"
date: 2025-11-03
date: 2026-11-02
part: C
slides: https://github.com/progintro/progintro.github.io/releases/download/2025/lec10.pdf
slides: https://progintro.github.io/assets/pdf/lec10.pdf
prev: 09-input
next: 11-pointers-recursion
topics: [arrays, input-output, input-validation, memory-model, strings, functions, searching, undefined-behavior]
Expand Down Expand Up @@ -42,6 +42,18 @@ labs: [lab06]
πίνακες είναι η βάση για τις συμβολοσειρές, τους δείκτες και σχεδόν όλους τους
αλγορίθμους του υπόλοιπου μαθήματος.

Οι ανακοινώσεις του 2026-27 άνοιξαν με δύο ερωτήσεις. *Ποια η διαφορά (υπάρχει;) μιας
συνάρτησης και ενός προγράμματος;* Ένα πρόγραμμα ξεκινά από τη `main`, που είναι κι
αυτή μια συνάρτηση. Τη διαφορά την κάνει ο καλών: μια συνάρτηση την καλεί άλλος
κώδικας του ίδιου προγράμματος, με ορίσματα οποιουδήποτε τύπου, ενώ ένα πρόγραμμα το
τρέχει το λειτουργικό σύστημα (π.χ. από το shell) και του δίνει ορίσματα μόνο ως
κείμενο (`argc`/`argv`). *Ποια η διαφορά ανάμεσα στην τιμή επιστροφής μιας συνάρτησης
και τον κωδικό εξόδου ενός προγράμματος;* Ο κωδικός εξόδου είναι η τιμή που επιστρέφει
η `main` ([Κεφάλαιο 3](../03-functions/)), αλλά φτάνει στο shell μόνο ως ένας μικρός
ακέραιος (στο Linux 0–255, που διαβάζετε με `echo $?`, με το `0` να σημαίνει
επιτυχία). Η τιμή επιστροφής μιας συνάρτησης μπορεί να είναι οποιουδήποτε τύπου και
τη χρησιμοποιεί ο κώδικας που την κάλεσε.

## Θεωρία

<a id="s10-1"></a><a id="η-συνάρτηση-scanf"></a>
Expand Down Expand Up @@ -639,12 +651,13 @@ $0 \to 4 \to 47 \to 472$.

## Διάβασμα

- **Διαφάνειες:** [Διάλεξη 10](https://github.com/progintro/progintro.github.io/releases/download/2025/lec10.pdf),
σελ. 1–52. `scanf` σελ. 5–16· `getinteger` και συχνότητες γραμμάτων σελ. 17–18·
- **Διαφάνειες:** [Διάλεξη 10](https://progintro.github.io/assets/pdf/lec10.pdf) (2026-27),
σελ. 1–52. Συνάρτηση και πρόγραμμα, τιμή επιστροφής και κωδικός εξόδου σελ. 2· `scanf` σελ. 5–16· `getinteger` και συχνότητες γραμμάτων σελ. 17–18·
γρίφος με τα αρκουδάκια σελ. 20–27· δήλωση, μνήμη, χρήση και αρχικοποίηση πίνακα
σελ. 28–36· `find_max` σελ. 37–38· διευθύνσεις και τύποι σελ. 39–40· strings
σελ. 41· ανάθεση, χρησιμότητα, όρια σελ. 42–44· `average`, `find`, `atoi`
σελ. 45–50.
σελ. 45–50. Οι διαφάνειες του 2025-26 έχουν την ίδια αρίθμηση (εκεί η σελ. 2 είναι
κενή): [Διάλεξη 10 (2025)](https://github.com/progintro/progintro.github.io/releases/download/2025/lec10.pdf).
- **Σημειώσεις:** η διάλεξη μαζί με την επόμενη καλύπτει τις σελίδες 73–103 των
σημειώσεων του κ. Σταματόπουλου. Για αυτό το κεφάλαιο:
[Κεφάλαιο 5: Δείκτες και πίνακες](https://progintro.github.io/notes/chapters/05-pointers-arrays/),
Expand Down
4 changes: 2 additions & 2 deletions questions/slides/slides-lec10-addnums.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ kind: slides
title: "Πρόσθεση δύο αριθμών από την είσοδο"
source:
title: "Διάλεξη 10, διαφάνεια 5"
url: https://github.com/progintro/progintro.github.io/releases/download/2025/lec10.pdf
years: [2025]
url: https://progintro.github.io/assets/pdf/lec10.pdf
years: [2025, 2026]
chapters: [10, 9]
topics: [input-output]
difficulty: 1
Expand Down
4 changes: 2 additions & 2 deletions questions/slides/slides-lec10-array-assign.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ kind: slides
title: "Ανάθεση πίνακα σε πίνακα"
source:
title: "Διάλεξη 10, διαφάνεια 42"
url: https://github.com/progintro/progintro.github.io/releases/download/2025/lec10.pdf
years: [2025]
url: https://progintro.github.io/assets/pdf/lec10.pdf
years: [2025, 2026]
chapters: [10]
topics: [arrays]
difficulty: 1
Expand Down
4 changes: 2 additions & 2 deletions questions/slides/slides-lec10-array-memory.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ kind: slides
title: "Ποιος πίνακας πιάνει περισσότερη μνήμη;"
source:
title: "Διάλεξη 10, διαφάνεια 40"
url: https://github.com/progintro/progintro.github.io/releases/download/2025/lec10.pdf
years: [2025]
url: https://progintro.github.io/assets/pdf/lec10.pdf
years: [2025, 2026]
chapters: [10]
topics: [arrays, types, memory-model]
difficulty: 1
Expand Down
4 changes: 2 additions & 2 deletions questions/slides/slides-lec10-atoi.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ kind: slides
title: "Η συνάρτηση atoi"
source:
title: "Διάλεξη 10, διαφάνειες 49-50"
url: https://github.com/progintro/progintro.github.io/releases/download/2025/lec10.pdf
years: [2025]
url: https://progintro.github.io/assets/pdf/lec10.pdf
years: [2025, 2026]
chapters: [10]
topics: [arrays, strings, functions]
difficulty: 2
Expand Down
4 changes: 2 additions & 2 deletions questions/slides/slides-lec10-average.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ kind: slides
title: "Μέσος όρος πίνακα"
source:
title: "Διάλεξη 10, διαφάνειες 45-46"
url: https://github.com/progintro/progintro.github.io/releases/download/2025/lec10.pdf
years: [2025]
url: https://progintro.github.io/assets/pdf/lec10.pdf
years: [2025, 2026]
chapters: [10]
topics: [arrays, functions]
difficulty: 1
Expand Down
4 changes: 2 additions & 2 deletions questions/slides/slides-lec10-find-max.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ kind: slides
title: "Το μεγαλύτερο αρκουδάκι"
source:
title: "Διάλεξη 10, διαφάνειες 21-26 και 37"
url: https://github.com/progintro/progintro.github.io/releases/download/2025/lec10.pdf
years: [2025]
url: https://progintro.github.io/assets/pdf/lec10.pdf
years: [2025, 2026]
chapters: [10]
topics: [arrays, functions]
difficulty: 1
Expand Down
4 changes: 2 additions & 2 deletions questions/slides/slides-lec10-find.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ kind: slides
title: "Αναζήτηση στοιχείου σε πίνακα"
source:
title: "Διάλεξη 10, διαφάνειες 47-48"
url: https://github.com/progintro/progintro.github.io/releases/download/2025/lec10.pdf
years: [2025]
url: https://progintro.github.io/assets/pdf/lec10.pdf
years: [2025, 2026]
chapters: [10]
topics: [arrays, functions, searching]
difficulty: 1
Expand Down
4 changes: 2 additions & 2 deletions questions/slides/slides-lec10-getinteger.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ kind: slides
title: "Τι κάνει η getinteger;"
source:
title: "Διάλεξη 10, διαφάνεια 17"
url: https://github.com/progintro/progintro.github.io/releases/download/2025/lec10.pdf
years: [2025]
url: https://progintro.github.io/assets/pdf/lec10.pdf
years: [2025, 2026]
chapters: [10, 9]
topics: [input-output, functions]
difficulty: 2
Expand Down
4 changes: 2 additions & 2 deletions questions/slides/slides-lec10-letter-frequency.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ kind: slides
title: "Τι κάνει ο πίνακας letfr;"
source:
title: "Διάλεξη 10, διαφάνεια 18"
url: https://github.com/progintro/progintro.github.io/releases/download/2025/lec10.pdf
years: [2025]
url: https://progintro.github.io/assets/pdf/lec10.pdf
years: [2025, 2026]
chapters: [10]
topics: [arrays, input-output]
difficulty: 2
Expand Down
4 changes: 2 additions & 2 deletions questions/slides/slides-lec10-out-of-bounds.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ kind: slides
title: "Πρόσβαση εκτός ορίων πίνακα"
source:
title: "Διάλεξη 10, διαφάνεια 44"
url: https://github.com/progintro/progintro.github.io/releases/download/2025/lec10.pdf
years: [2025]
url: https://progintro.github.io/assets/pdf/lec10.pdf
years: [2025, 2026]
chapters: [10]
topics: [arrays, undefined-behavior]
difficulty: 1
Expand Down
4 changes: 2 additions & 2 deletions questions/slides/slides-lec10-scanf-correct.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ kind: slides
title: "Είναι σωστό αυτό το πρόγραμμα;"
source:
title: "Διάλεξη 10, διαφάνειες 12-14"
url: https://github.com/progintro/progintro.github.io/releases/download/2025/lec10.pdf
years: [2025]
url: https://progintro.github.io/assets/pdf/lec10.pdf
years: [2025, 2026]
chapters: [10]
topics: [input-output, input-validation]
difficulty: 2
Expand Down
4 changes: 2 additions & 2 deletions questions/slides/slides-lec10-scanf-no-ampersand.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ kind: slides
title: "scanf χωρίς &"
source:
title: "Διάλεξη 10, διαφάνεια 11"
url: https://github.com/progintro/progintro.github.io/releases/download/2025/lec10.pdf
years: [2025]
url: https://progintro.github.io/assets/pdf/lec10.pdf
years: [2025, 2026]
chapters: [10, 11]
topics: [input-output, pointers]
difficulty: 2
Expand Down
4 changes: 2 additions & 2 deletions questions/slides/slides-lec10-scanf-square.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ kind: slides
title: "Τι κάνει το πρόγραμμα με τη scanf;"
source:
title: "Διάλεξη 10, διαφάνειες 9-10"
url: https://github.com/progintro/progintro.github.io/releases/download/2025/lec10.pdf
years: [2025]
url: https://progintro.github.io/assets/pdf/lec10.pdf
years: [2025, 2026]
chapters: [10]
topics: [input-output]
difficulty: 1
Expand Down
4 changes: 2 additions & 2 deletions questions/slides/slides-lec10-scanf-two-numbers.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ kind: slides
title: "scanf με πολλά ορίσματα"
source:
title: "Διάλεξη 10, διαφάνειες 15-16"
url: https://github.com/progintro/progintro.github.io/releases/download/2025/lec10.pdf
years: [2025]
url: https://progintro.github.io/assets/pdf/lec10.pdf
years: [2025, 2026]
chapters: [10]
topics: [input-output]
difficulty: 1
Expand Down
7 changes: 5 additions & 2 deletions sources/extract/lec10.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
lecture: 10
year: 2026-27 # updated from the 2025-26 deck (53 pages) on 2026-11-02; same page numbers
slides: https://progintro.github.io/assets/pdf/lec10.pdf
pages: 53
outline:
- {pages: "1", section: "(τίτλος)"}
- {pages: "2", section: "(ανακοινώσεις / διευκρινίσεις: κενή διαφάνεια)"}
- {pages: "2", section: "Σύνοψη"} # 2026-27: function vs program, return value vs exit code
- {pages: "3-4", section: "(προηγούμενη φορά / σήμερα)"}
- {pages: "5", section: "Η `getinteger` με `getchar` (Παραδείγματα)"}
- {pages: "6-8", section: "Η συνάρτηση `scanf`"}
Expand Down Expand Up @@ -39,7 +41,8 @@ pointers:
- {page: 51, text: "Memoization: https://en.wikipedia.org/wiki/Memoization"}
takeaways_slide: null # p. 51 is a reading assignment, not a takeaways slide
issues:
- "p. 2: 'Ανακοινώσεις / Διευκρινίσεις' slide has a title and no content."
- "2026-27 deck vs 2025-26 (both 53 pages, same page numbers). p. 2 was empty and now asks two questions: «Ποια η διαφορά (υπάρχει;) μιας συνάρτησης και ενός προγράμματος;» and «Ποια η διαφορά (υπάρχει;) ανάμεσα στην τιμή επιστροφής μιας συνάρτησης και τον κωδικό εξόδου ενός προγράμματος;». The slides give no answer; the chapter's Σύνοψη answers both briefly (caller: other code vs the OS; typed arguments vs argv text; exit code = main's return value, 0-255 on Linux, read with echo $?). pp. 3-4 add painting captions (p. 4 also «Πίνακας με Πίνακες!»), and the closing p. 52 says «καλή μέρα» instead of «καλό Σαββατοκύριακο»."
- "2025-26 p. 2: 'Ανακοινώσεις / Διευκρινίσεις' slide has a title and no content."
- "p. 53: stray slide 'The Iron Triangle of Project Management' (Scope / Cost / Time around Quality) after the closing slide; unrelated to arrays, left out of the chapter."
- "p. 14: the second run ('Gimme a number: Square:' then 1068701481) shows no input; the chapter interprets it as EOF (Ctrl-D), which the slide does not state."
- "p. 17: the comment 'No need to declare ch as int - no EOF handling' sits next to 'int ch;' (as in the notes); transcribed as is."
Expand Down
2 changes: 1 addition & 1 deletion sources/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ lectures:
- {n: 7, slug: 07-problem-solving, date: 2026-10-23, part: B, slides: lec07.pdf, url: "https://progintro.github.io/assets/pdf/lec07.pdf", title: "Επίλυση Προβλημάτων", notes: [01-first-programs], labs: [lab03]}
- {n: 8, slug: 08-control-flow-2, date: 2026-10-26, part: B, slides: lec08.pdf, url: "https://progintro.github.io/assets/pdf/lec08.pdf", title: "Ροή Ελέγχου #2", notes: [03-control-flow], labs: [lab03]}
- {n: 9, slug: 09-input, date: 2026-10-30, part: B, slides: lec09.pdf, url: "https://progintro.github.io/assets/pdf/lec09.pdf", title: "Δεδομένα Εισόδου", notes: [01-first-programs, 09-io], labs: [lab04]}
- {n: 10, slug: 10-arrays, date: 2025-11-03, part: C, slides: lec10.pdf, title: "Πίνακες", notes: [05-pointers-arrays], labs: [lab06]}
- {n: 10, slug: 10-arrays, date: 2026-11-02, part: C, slides: lec10.pdf, url: "https://progintro.github.io/assets/pdf/lec10.pdf", title: "Πίνακες", notes: [05-pointers-arrays], labs: [lab06]}
- {n: 11, slug: 11-pointers-recursion, date: 2025-11-07, part: C, slides: lec11.pdf, title: "Δείκτες και Αναδρομή", notes: [04-functions, 05-pointers-arrays], labs: [lab05, lab06]}
- {n: 12, slug: 12-pointers-arrays, date: 2025-11-10, part: C, slides: lec12.pdf, title: "Δείκτες και Πίνακες", notes: [05-pointers-arrays], labs: [lab06]}
- {n: 13, slug: 13-memory, date: 2025-11-14, part: C, slides: lec13.pdf, title: "Μνήμη", notes: [06-memory-strings], labs: [lab07]}
Expand Down
Loading