/Sjce-First-Year-Lab-Cycle-Solution

This contains solutions of all the lab cycles of Sjce for first year students.

Primary LanguageC

Sjce-First-Year-Lab-Cycle-Solution

This repository contains the C programs that are to be conducted in the C programming lab. These are meant to enhance the ease of understanding to write code in C language.

I have added extensive comments to some programs so that it will help a beginner to understand the code without much difficulty (some background is assumed). The programs with extensive comments are named as XXXX_tut.c (short for tutorial).

These programs have been tested to work fine for most of the cases on ubuntu 16.04 with gcc 4.9.0

Some programs give warnings while compiling, this may be because these functions will be deprecated in future.

How to compile and run on linux

  • For programs that don't use "math.h" header

    • Compile
      $ gcc <filename>.c
    • Run
      $ ./a.out
  • For programs that use "math.h" header

    • Compile
      $ gcc <filename>.c -lm
    • Run
      $ ./a.out

Further implementations

  • adding remaining lab cycles
  • adding more XXXX_tut.c files
  • adding sample output to every program