Nest

Search
Skip to content
  • Announcements
  • Join us
  • Contact
  • Resources
    • Software setup for programming
      • Remote access using RDP
      • Guide to running Linux on your own
      • Geany and compiler installation guide
      • Configuring and using Geany
    • Accessing files on P drive from home (SFTP guide)
    • SSH connection guide
    • Introduction to algorithms and UML
      • UML example: WD40
      • UML example: filtering positive numbers into an array
    • File browser
    • Links
  • Coding guides
    • Coding style
    • Using printf with tips and tricks
    • Conditional statements
    • Loops
    • Fun with Valgrind
    • Stream redirection
    • Using a debugger with Geany
  • Programming I
    • Getting started: Programming 1
    • Labs
    • Homework I
    • Homework II
    • Algorithm tasks
    • Code examples
      • hello.c
      • Odd or even? (parity.c)
      • Loops – multiplication table
      • Initializing variables
      • math.h library
      • Distance converter (arrays with functions)
      • Accessing command line arguments
      • File name as command line argument
      • Managing multiple files
      • Manipulating characters (characters.c)
    • FAQ
    • Exam
  • Programming II
    • Getting started: Programming 2
    • Labs
    • Homework I
    • Homework II
    • Homework III
      • Homework III variant: local weather
      • Homework III variant: Microcontroller postfix task
      • Homework III variant: Abstract data structures
      • Homework III variant: SQL
    • Code examples
      • Identifying a flying object (enumeration example)
      • Structure array example
      • Reading from a file into structure array
      • Structure pointer example
      • Returning a struct
      • Data type agnostic bubble sort
      • Substruct example
      • Creating easily reusable code
      • Writing to multiple output streams
      • Structure pointer as a member of structure
      • realloc() partial solution
      • struct_wrapper_dynamic
    • Test
    • Examination

Code examples

The following code samples are related to Programming II labs. Most samples have both code and explanations and are tied to certain labs. They may also be solutions for lab tasks with additional explanations.

  • Identifying a flying object (enumeration example)
  • Structure array example
  • Reading from a file into structure array
  • Structure pointer example
  • Returning a struct
  • Data type agnostic bubble sort
  • Substruct example
  • Creating easily reusable code
  • Writing to multiple output streams
  • Structure pointer as a member of structure
  • realloc() partial solution
  • struct_wrapper_dynamic
  • Announcements
  • Contact
  • Coding style
  • Software setup
  • Programming I
    • Labs
    • Code examples
  • Programming II
    • Labs
    • Code examples
  • Links
  • Report issues (Uni-ID required)
  • Eesti
  • English

Pesa 2024 Powered by magic and unicorns