Skip to content

patgiri/C-programming

Repository files navigation

C-programming

Source code of C programming for students

List of C programming for stduents to practise

Anagram program

anagram.c

Anagram example:

  1. arm is anagram of gram but gram is not an anagram of arm
  2. anil is anagram of lina and vice versa
  3. allain is anagram of anil or vice versa
  4. jan is anagram of janisa but janisa is not an anagram of jan
  5. Emon is not anagram of emon

Password strength checker: Based on symbol, character and digit counts

passwordChecker.c

Password strength checker checks the password strength based on symbol count, small letter count, capital letter count and digit counts.

  • Password length must be greater than eqaul to 8.
  • Password must contains at least one symbol, one small letter, one capital letter and a digit.

Random number generator: 32-bit and 64-bit random number generator

random.h

It is a header file containing random number generator.

  • The random32() generates 32-bit random number
  • The random64() generates 64-bit random number
  • The random number generator is a basic random number generator using CPU Clock cycle

Note: It does not work on windows

random.c

It includes random.h file and generates 10 random numbers for 32-bit and 64-bit each.

Compilation:

$gcc random.c

Running the code:

$./a.out

Swap two integer variable

swap.c

Swap two varaibles using four methods-

  • Swap two varaibles using temporary variable
  • Swap two varaibles using multiplication (∗) and division (/) operators
  • Swap two varaibles using addition (+) and substraction (-) operators
  • Swap two varaibles using XOR operator (^)

Instructor:

Dr. Ripon Patgiri

National Institute of Technology Silchar

About

Source code of C programming for students

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages