Skip to content

RegalKing/C-PROG2-FRI-UNI-LJ

Repository files navigation

C-P2-UNI-FRI-2023

The C Language programming course known as "Programming 2" at the University of Ljubljana, Faculty of Computer and Information Science

Professor Dr. Boštjan Slivnik

All the code is in C.

This course is known as the hardest course out of the ten courses in the first year at the Faculty, with a passrate of around 35% every year, meaning 65% of students fail the class each Academic year.

Every task with a working makefile and test units can be tested using the following sequence of commands:

gcc -o FileName FileName.c
export name=FileName
make test

You can also run the program manually using the following sequence of commands:

gcc -o FileName FileName.c
./FileName

Programming 2 - Progress tracker

Control Constructs I - Week 1 
  • Sum modulo: Write a program that reads numbers a and b and outputs their sum modulo 10
  • All equal: Write a program that reads a number n and n more numbers, and then outputs 1 if all of the n numbers are equal to each other, and 0 if this is not the case.
  • Second largest: Write a program that reads a number n and n more numbers, and then outputs the second largest among those n numbers. If there are multiple numbers that are the largest, the second largest number is equal to the largest number.
Control Constructs II - Week 2 
  • Pythagorean Threes
  • Optimal Guessing
Functions - Week 3
  • Friend Numbers
  • Lychrel Numbers Manipulation
Arrays - Week 4
  • Permutation variants of an array
  • Biggest sum of sub-array in an array
Arrays, Pointers, Sequences I - Week 5
  • Function Sum
  • Function IndexAndPointer
  • Function FrequencyOfLetters
Arrays, Pointers, Sequences II - Week 6
  • Function NumberOfCharacters
  • Function CopyStringUntilCharacter
  • Function StringSegmentation
Recursion I - Week 7
Recursion II - Week 8
Recursion III - Week 9
  • All Possible Lexicographical Strings of [1,N] length between two characters
  • Partitions of a set
Structures - Week 10
  • Function findStudent
  • Function findIfStudentHasSubject
  • Function Enrichen
Linked Lists - Week 11
  • Iterative implementation of function SumOfLinkedList function
  • Recursive implementation of function SumOfLinkedList function
  • Iterative implementation of InsertElementInAscendingSortedLinkedList function
  • Recursive implementation of InsertElementInAscendingSortedLinkedList function
Text Files - Week 12
  • Copy longest line from a file to a new file containing only said line
  • Merge N number of files with an ascending list of numbers into one single file with all the numbers together in ascending order
Binary Files - Week 13
  • Color of a dot
  • Transformation into grays

Roadmap

  • Control Constructs I - Week 1
  • Control Constructs II - Week 2
  • Functions - Week 3
  • Arrays - Week 4
  • Arrays, Pointers, Sequences I - Week 5
  • Arrays, Pointers, Sequences II - Week 6
  • Recursion I - Week 7
  • Recursion II - Week 8
  • Recursion III - Week 9
  • Structures - Week 10
  • Linked Lists - Week 11
  • Text Files - Week 12
  • Binary Files - Week 13

Past Years Exams & Midterms

2018
  • 2018 - 1st Midterm A - 2nd task
  • 2018 - 1st Midterm B - 2nd task

  • 2018 - 2nd Midterm A - 1st task
  • 2018 - 2nd Midterm B - 1st task
 2019
  • 2019 - 1st Exam - 1st task
2022
  • 2022 - 1st Exam - 1st task
  • 2022 - 1st Exam - 3rd task

  • 2022 - 1st Exam - 1st task [Online Exam version]
  • 2022 - 1st Exam - 2nd task [Online Exam version]
  • 2022 - 1st Exam - 3rd task [Online Exam version]

  • 2022 - 2nd Exam - 1st task
  • 2022 - 2nd Exam - 2nd task

  • 2022 - 3rd Exam - 1st task
  • 2022 - 3rd Exam - 2nd task
  • 2022 - 3rd Exam - 3rd task
2023
  • 2023 - 1st Midterm A - 1st task
  • 2023 - 1st Midterm A - 2nd task
  • 2023 - 1st Midterm A - 3rd task

  • 2023 - 2nd Midterm A - 1st task
  • 2023 - 2nd Midterm A - 2nd task
  • 2023 - 2nd Midterm A - 3rd task
  • 2023 - 2nd Midterm B - 1st task
  • 2023 - 2nd Midterm B - 2nd task
  • 2023 - 2nd Midterm B - 3rd task

  • 2023 - 1st Exam - 1st task
  • 2023 - 1st Exam - 2nd task
  • 2023 - 1st Exam - 3rd task

  • 2023 - 2nd Exam - 1st task
  • 2023 - 2nd Exam - 2nd task
  • 2023 - 2nd Exam - 3rd task

The files for the 3rd exam of 23/24 are available as well.

Goal

  • Pass the subject (Grade: 8)

About

My code for the "Programming 2" course in C at the University of Ljubljana, Faculty of Computer and Information Science.

Resources

Stars

Watchers

Forks

Releases

No releases published