Fundamentals
- Hello world program in C
- Basic input/output
- Basic IO on all data types
- Perform arithmetic operations
- Find area and perimeter of rectangle
- Find diameter and area of circle
- Find area of triangle
- Find angles of triangle
- Temperature conversion
- Length conversion
- Days conversion
- Find power of a number
- Find square root
- Calculate simple interest
- Calculate compound interest
- Find range of data types
- View all →
Bitwise Operator
- Check Least Significant Bit (LSB)
- Check Most Significant Bit (MSB)
- Get nth bit of a number
- Set nth bit of a number
- Clear nth bit of a number
- Toggle nth bit of a number
- Highest set bit of a number
- Lowest set bit of a number
- Count trailing zeros of binary number
- Count leading zeros of binary number
- Flip bits of a number
- Rotate bits of a number
- Decimal to binary
- Swap two numbers
- Check even or odd
- View all Bitwise operator examples →
If Else
- Find maximum of two numbers
- Find maximum of three numbers
- Check negative, positive or zero
- Check divisibility
- Check even or odd
- Check leap year
- Check alphabet character
- Check vowel or consonant
- Check alphabet, digit or special character
- Check uppercase or lowercase
- Print day of week
- Find number of days in month
- Find roots of quadratic equation
- Calculate profile/loss
- View all if else examples →
Loop/Iteration
- Print natural numbers from 1 to n
- Print alphabets from a to z
- Print even numbers from 1 to n
- Print sum of all numbers from 1 to n
- Print sum of all odd numbers from 1 to n
- Print multiplication table of n
- Find number of digits in a number
- Find first and last digit
- Find sum of first and last digit
- Swap first and last digit
- Find sum of digits of a number
- Find reverse of a number
- Find frequency of digits in a number
- Find power of a number using loop
- Find factorial of a number
- Find HCF of two numbers
- Find LCM of two numbers
- View all loop examples →
Number system and conversion
- Find one's complement
- Find two's complement
- Binary to octal conversion
- Binary to decimal conversion
- Binary to hexadecimal conversion
- Octal to binary conversion
- Octal to decimal conversion
- Octal to hexadecimal conversion
- Decimal to binary conversion
- Decimal to octal conversion
- Decimal to hexadecimal conversion
- Hexadecimal to binary conversion
- Hexadecimal to octal conversion
- Hexadecimal to decimal conversion
- View all conversion examples →
Star patterns
- Pascal triangle generation
- Square star pattern
- Hollow square star pattern
- Hollow square star pattern with diagonal
- Rhombus star pattern
- Hollow rhombus star pattern
- Right triangle star pattern
- Hollow right triangle star pattern
- Inverted right triangle star pattern
- Mirrored inverted right triangle star pattern
- Pyramid star pattern
- Inverted pyramid star pattern
- Diamond star pattern
- Plus starpattern
- X star pattern
- 8 star pattern
- Heart star with name pattern
- View all star pattern examples →
Functions
- Find cube using functions
- Diameter & area of circle using functions
- Maximum and minimum using functions
- Check even odd using functions
- Check Prime number using functions
- Find all prime numbers using functions
- Find all strong numbers using functions
- Find all armstrong numbers using functions
- Find all perfect numbers using functions
- View all function examples →
Recursion
- Find power using recursion
- Print natural numbers using recursion
- Print even numbers using recursion
- Sum of natural numbers using recursion
- Sum of even/odd numbers using recursion
- Find reverse using recursion
- Check palindrome using recursion
- Find sum of digits using recursion
- Find factorial using recursion
- Generate nth Fibonacci term using recursion
- Find HCF (GCD) using recursion
- Find LCM using recursion
- Sum of array elements using recursion
- View all recursion examples →
Array
- Input and display array elements
- Sum of all array elements
- Find second largest element in array
- Copy one array to another
- Insert new element in array
- Delete an element from array
- Find frequency of array elements
- Merge two array to third array
- Delete duplicate elements from array
- Reverse an array
- Search an element in array
- Sort an array
- Left rotate an array
- Right rotate an array
- View all array examples →
Matrix (2D array)
- Add two matrices
- Scalar matrix multiplication
- Multiply two matrices
- Check if two matrices are equal
- Sum of diagonal elements of matrix
- Interchange diagonal of matrix
- Find upper triangular matrix
- Find sum of lower triangular matrix
- Find transpose of triangular matrix
- Find determinant of a matrix
- Check identity matrix
- Check sparse matrix
- Check symmetric matrix
- View all matrix examples →
String
- Find length of string
- Copy string to another string
- Concatenate two strings
- Compare two strings
- Convert lowercase to uppercase
- Find reverse of a string
- Check palindrome
- Reverse order of words
- Search a character in string
- Search a word in string
- Find highest occurring character
- Remove all duplicate characters
- Replace a character in string
- Trim whitespace from string
- View all string examples →
Pointer
- Create, initialize and use pointer
- Add two numbers using pointers
- Swap two numbers using pointers
- Access array using pointers
- Copy array using pointers
- Reverse array using pointers
- Access 2D array using pointers
- Multiply matrices using pointers
- Copy strings using pointers
- Concatenate strings using pointers
- Compare strings using pointers
- Reverse strings using pointers
- Sort array strings using pointers
- Return multiple values from function using pointers
- View all pointers examples →
Files
- Create file and write contents
- Read file contents and display
- Append contents to file
- Compare two files
- Copy one file to another
- Merge two files
- Remove a word from file
- Remove a line from file
- Replace a word in file
- Replace a line in file
- Print source code
- Convert uppercase to lowercase in file
- Find properties of file
- Check if file or directory exists
- Rename a file or directory
- List of files recursively
- View all files handling examples →