Skip to content

aditya20-b/C-Assignments

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Computer Science Lab Exercises

This repository contains a collection of exercises designed to help students learn and practice important computer science concepts. The exercises are written in C and cover a variety of topics, including loops, strings and arrays, functions and recursion, pointers and structures, and file handling.

Setup

To complete the exercises in this repository, you will need the following tools:

  • A C compiler (such as GCC)
  • A text editor (such as Visual Studio Code or Sublime Text)

To compile and run the exercises, follow these steps:

  1. Open a terminal or command prompt.
  2. Navigate to the directory where the exercise files are located.
  3. Compile the exercise using the gcc command. For example, to compile exercise1.c, you would use the command gcc exercise1.c -o exercise1.
  4. Run the compiled exercise using the ./ command. For example, to run exercise1, you would use the command ./exercise1.

Compiling the Programs

You can use the make command to automatically compile all of the programs in this repository. To do this, you will need to have the make utility installed on your system.

To use make, open a terminal or command prompt and navigate to the directory where the Makefile is located. Then, simply run the make command. This will compile all of the programs in the repository and create executables in the build folder in the root of the repository. The programs in the build folder are divided into folders based on the exercise they belong to.

Alternatively, you can compile each program individually using the gcc command, as described in the "Setup" section above.

You can find the Makefile for this repository here.

Exercises

  1. Exercise 1: Loops - This exercise covers the use of loops to iterate over collections of data.

  2. Exercise 2: Strings and Arrays - This exercise covers the use of strings and arrays to store and manipulate data.

  3. Exercise 3: Functions and Recursion - This exercise covers the use of functions and recursion to break down complex tasks into smaller, more manageable pieces.

  4. Exercise 4: Pointers and Structures - This exercise covers the use of pointers and structures to manage complex data structures.

  5. Exercise 5: File Handling - This exercise covers the use of file handling functions to read and write data from and to files.

License

All content in this repository is licensed under the MIT License. See the LICENSE file for more information.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published