c

C Projects

This document outlines a series of C programming projects, ranging from beginner to advanced levels. Each project includes a brief description and a link to the main file.

Beginner Projects

1. Rock-Paper-Scissors

A simple implementation of the classic game where the user plays against the computer. This project introduces basic concepts like input/output, conditionals, and random number generation.

2. Calculator

A basic calculator that performs simple arithmetic operations such as addition, subtraction, multiplication, and division. This project helps you understand functions and switch-case statements.

3. Number Guessing Game

A game where the computer generates a random number and the user has to guess it. This project focuses on loops, conditionals, and random number generation.

4. Temperature Converter

A program that converts temperatures between Celsius, Fahrenheit, and Kelvin. This project is useful for learning about user input and arithmetic operations.

5. Simple To-Do List

A console-based to-do list application where users can add, view, and delete tasks. This project introduces the basics of working with arrays and strings.

6. Currency Converter

A program that converts amounts between different currencies. This project helps practice arithmetic operations and user input.

7. Basic Voting System

A simple voting system where users can vote for candidates and see the results. This project involves arrays and input/output handling.

8. Odd or Even Checker

A program that checks whether a given number is odd or even. This project is useful for learning conditionals and modulus operations.

9. Factorial Calculator

A program that calculates the factorial of a given number. This project introduces recursion and iterative methods.

10. Prime Number Checker

A program that checks if a given number is prime. This project involves loops and conditionals.

11. Palindrome Checker

A program that checks if a given string or number is a palindrome. This project involves string handling and loops.

12. Fibonacci Sequence Generator

A program that generates the Fibonacci sequence up to a specified number. This project introduces loops and recursion.

13. Basic Quiz

A simple quiz application where users answer multiple-choice questions. This project covers arrays, strings, and input/output.

14. Simple Stopwatch

A console-based stopwatch application. This project involves working with time functions and loops.

15. Basic Alarm Clock

A simple alarm clock that allows the user to set an alarm. This project involves working with time and input/output.

16. Grade Calculator

A program that calculates the grade based on scores entered by the user. This project covers basic arithmetic and conditionals.

17. Simple Interest Calculator

A program that calculates simple interest based on user input. This project involves arithmetic operations and user input.

18. Compound Interest Calculator

A program that calculates compound interest. This project involves loops and arithmetic operations.

19. Distance Converter

A program that converts distances between various units. This project involves user input and arithmetic operations.

20. Basic Login System

A simple login system where users can register and log in. This project covers file handling and string manipulation.

21. Simple Voting System

A basic voting system that allows users to cast votes and displays results. This project involves arrays and conditionals.

22. Simple Encryption

A program that encrypts and decrypts messages using a basic algorithm. This project introduces string manipulation and basic encryption techniques.

23. Area Calculator

A program that calculates the area of various shapes like circle, rectangle, and triangle. This project covers arithmetic operations and user input.

24. BMI Calculator

A program that calculates the Body Mass Index (BMI) based on user input. This project involves arithmetic operations and conditionals.

25. Basic Email Validator

A program that checks if an email address is valid based on simple criteria. This project involves string manipulation and regular expressions.

26. Leap Year Checker

A program that checks if a given year is a leap year. This project involves conditionals and arithmetic operations.

27. Power Calculator

A program that calculates the power of a number using both iterative and recursive methods. This project introduces loops and recursion.

28. Simple Calendar

A program that displays a simple calendar for a given month and year. This project involves loops and conditionals.

29. ASCII Art Generator

A program that generates simple ASCII art from user input. This project covers loops, conditionals, and string manipulation.

30. Anagram Checker

A program that checks if two given strings are anagrams. This project involves string manipulation and sorting algorithms.

Intermediate Projects

31. Word Counter

A program that counts the number of words in a given text. This project involves string handling and loops.

32. File Copier

A program that copies the contents of one file to another. This project introduces file handling.

33. Vowel Counter

A program that counts the number of vowels in a given string. This project involves loops and string manipulation.

34. GCD Calculator

A program that calculates the Greatest Common Divisor (GCD) of two numbers using Euclidean algorithm. This project covers loops and conditionals.

35. LCM Calculator

A program that calculates the Least Common Multiple (LCM) of two numbers. This project involves arithmetic operations and loops.

36. Binary to Decimal Converter

A program that converts a binary number to decimal. This project covers loops and arithmetic operations.

37. Decimal to Binary Converter

A program that converts a decimal number to binary. This project involves loops and arithmetic operations.

38. Hexadecimal to Decimal Converter

A program that converts a hexadecimal number to decimal. This project covers string manipulation and arithmetic operations.

39. Decimal to Hexadecimal Converter

A program that converts a decimal number to hexadecimal. This project involves loops and string manipulation.

40. Matrix Addition

A program that adds two matrices. This project covers arrays, loops, and arithmetic operations.

41. Matrix Multiplication

A program that multiplies two matrices. This project involves arrays, loops, and arithmetic operations.

42. Transpose of a Matrix

A program that calculates the transpose of a matrix. This project covers arrays and loops.

43. Determinant of a Matrix

A program that calculates the determinant of a matrix. This project involves arrays and recursion.

44. Matrix Inversion

A program that calculates the inverse of a matrix. This project covers arrays, loops, and advanced arithmetic operations.

45. Sieve of Eratosthenes

A program that generates all prime numbers up to a given limit using the Sieve of Eratosthenes algorithm. This project involves arrays and loops.

46. Bubble Sort

A program that sorts an array using the bubble sort algorithm. This project introduces basic sorting algorithms.

47. Selection Sort

A program that sorts an array using the selection sort algorithm. This project involves arrays and loops.

48. Insertion Sort

A program that sorts an array using the insertion sort algorithm. This project covers arrays and loops.

49. Merge Sort

A program that sorts an array using the merge sort algorithm. This project involves recursion and arrays.

50. Quick Sort

A program that sorts an array using the quick sort algorithm. This project covers recursion and arrays.

A program that implements binary search algorithm on a sorted array. This project introduces searching algorithms and conditionals.

A program that implements the linear search algorithm on an array. This project involves loops and conditionals.

53. Palindrome Number

A program that checks if a given number is a palindrome. This project involves loops and conditionals.

54. Reverse a String

A program that reverses a given string. This project involves string manipulation and loops.

55. Reverse a Number

A program that reverses the digits of a given number. This project involves loops and arithmetic operations.

56. Count Digits of a Number

A program that counts the number of digits in a given number. This project involves loops and conditionals.

57. Armstrong Number Checker

A program that checks if a given number is an Armstrong number. This project involves loops and arithmetic operations.

58. Strong Number Checker

A program that checks if a given number is a strong number. This project involves loops and conditionals.

59. Perfect Number Checker

A program that checks if a given number is a perfect number. This project involves loops and conditionals.

60. Find Largest Element in Array

A program that finds the largest element in an array. This project involves loops and arrays.

61. Find Smallest Element in Array

A program that finds the smallest element in an array. This project involves loops and arrays.

62. Sum of Array Elements

A program that calculates the sum of elements in an array. This project involves loops and arrays.

63. Average of Array Elements

A program that calculates the average of elements in an array. This project involves loops and arrays.

64. Find Second Largest Element in Array

A program that finds the second largest element in an array. This project involves loops and arrays.

65. Frequency of Elements in Array

A program that finds the frequency of each element in an array. This project involves loops and arrays.

66. Merge Two Arrays

A program that merges two arrays into one. This project involves loops and arrays.

67. Split Array into Two Halves

A program that splits an array into two halves. This project involves loops and arrays.

68. Cyclically Rotate Array

A program that cyclically rotates an array by one position. This project involves loops and arrays.

69. Count Vowels and Consonants

A program that counts the number of vowels and consonants in a string. This project involves loops and string manipulation.

70. Remove Vowels from String

A program that removes all vowels from a given string. This project involves loops and string manipulation.

71. Find Substring in String

A program that finds a substring within a given string. This project involves loops and string manipulation.

72. Remove Spaces from String

A program that removes all spaces from a given string. This project involves loops and string manipulation.

73. Count Words in String

A program that counts the number of words in a string. This project involves loops and string manipulation.

74. Find and Replace in String

A program that finds a substring and replaces it with another substring in a given string. This project involves loops and string manipulation.

75. Capitalize First Letter of Each Word

A program that capitalizes the first letter of each word in a string. This project involves loops and string manipulation.

76. Lowercase to Uppercase Converter

A program that converts all lowercase letters to uppercase in a string. This project involves loops and string manipulation.

77. Uppercase to Lowercase Converter

A program that converts all uppercase letters to lowercase in a string. This project involves loops and string manipulation.

78. Count Occurrences of Character in String

A program that counts the occurrences of a character in a string. This project involves loops and string manipulation.

79. Remove Character from String

A program that removes all occurrences of a character from a string. This project involves loops and string manipulation.

80. Reverse Words in String

A program that reverses the order of words in a string. This project involves loops and string manipulation.

81. Check if String is a Subsequence

A program that checks if one string is a subsequence of another. This project involves loops and string manipulation.

82. Longest Common Subsequence

A program that finds the longest common subsequence between two strings. This project involves loops and dynamic programming.

83. Longest Increasing Subsequence

A program that finds the longest increasing subsequence in an array. This project involves loops and dynamic programming.

84. Edit Distance

A program that calculates the edit distance between two strings. This project involves loops and dynamic programming.

85. Knapsack Problem

A program that solves the knapsack problem using dynamic programming. This project involves loops and dynamic programming.

Advanced Projects

86. N-Queens Problem

A program that solves the N-Queens problem using backtracking. This project involves recursion and backtracking.

87. Sudoku Solver

A program that solves a given Sudoku puzzle. This project involves recursion and backtracking.

88. Rat in a Maze

A program that finds a path for a rat in a maze using backtracking. This project involves recursion and backtracking.

A program that finds words in a grid using backtracking. This project involves recursion and backtracking.

90. Graph Representation

A program that represents a graph using adjacency matrix and adjacency list. This project involves arrays and linked lists.

A program that implements the Depth First Search (DFS) algorithm on a graph. This project involves recursion and graphs.

A program that implements the Breadth First Search (BFS) algorithm on a graph. This project involves queues and graphs.

93. Dijkstra’s Algorithm

A program that finds the shortest path in a graph using Dijkstra’s algorithm. This project involves priority queues and graphs.

94. Floyd-Warshall Algorithm

A program that finds shortest paths between all pairs of vertices in a graph. This project involves dynamic programming and graphs.

95. Prim’s Algorithm

A program that finds the Minimum Spanning Tree (MST) of a graph using Prim’s algorithm. This project involves priority queues and graphs.

96. Kruskal’s Algorithm

A program that finds the Minimum Spanning Tree (MST) of a graph using Kruskal’s algorithm. This project involves disjoint sets and graphs.

97. Topological Sort

A program that performs topological sorting on a directed acyclic graph. This project involves recursion and graphs.

98. Huffman Coding

A program that implements Huffman coding for data compression. This project involves priority queues and trees.

99. Trie Implementation

A program that implements a Trie data structure for efficient information retrieval. This project involves trees and strings.

100. Turing Machine Simulator

A program that simulates a Turing machine. This project involves complex logic and data structures.


If you need to use cs50 library,

1.Install cs50

2.Create a file Makefile in the project folder and add

CC= clang
LDLIBS =-lcs50

3.Then just run

make main

4.Then run

./main