Basic C Programs

BASIC C PROGRAMS

C-program to print Hello World
C-program to add two numbers
C-program to use bitwise operators like &(AND), |(OR), <<(LEFT SHIFT), >>(RIGHT SHIFT) , ~(NEGATION)
C-program to find the maximum between three numbers
C-program to find the maximum between three numbers using ternary operator(conditional operator)
C-program to find area of a given circle
C-program to check if the given year is a leap year or not
C-program to check if the given number is even or odd
C-program to find odd numbers of first n terms
C-program to find sum of first n natural numbers
C-program to convert a decimal number to a binary number 
C-program to find factorial of a given number
C-program to check whether a given number is prime or not
C-program to generate prime numbers upto n
C-program to generate first n prime numbers
C-program to check whether the given number is an armstrong number or not
C-program to generate armstrong numbers from 1 to n 
C-program to generate first n armstrong numbers
C-program to find fibonacci series for first n terms
C-program to find fibonacci series upto n(upto a given range)
C-program to convert temperature from Fahrenheit to Celsius
C-program to reverse a number
C-program to check whether the given number is a palindrome or not
C-program to swap two numbers
C-program to swap two numbers without using a third variable or using only two variables
C-program to find lcm of two numbers
C-program to find gcd/hcf of two numbers
C-program to find lcm and gcd/hcf of two numbers
C-program to find the power of a number without using pow() function
C-program to find the power of a number using pow() function
C-program to find the roots of a quadratic equation and check if they are real, distinct or imaginary(complex number)
Menu driven c-program for calculator (how to use switch case statement)
C-program to convert a string from lowercase to uppercase
C-program to convert a string from uppercase to lowercase
C-program to toggle all characters of a string
C-program to check if the string is a palindrome
C-program to find length of a string without using string function(strlen)
C-program to find length of a string using string function(strlen)
C-program to copy a string without using string function(strcpy)
C-program to copy a string using string function(strcpy)
C-program to compare two strings without using string function(strcmp)
C-program to compare two strings using string function(strcmp)
C-program to reverse a string without using string function(strrev)
C-program to reverse a string using string function(strrev)
C-program to concatenate two strings without using string function(strcat)
C-program to concatenate two strings using string function(strcat) 
C-program to find number of vowels, consonants, digits,white spaces and special characters in a given string
Share Me!
  •  
  •  
  •  
  •  
  •  
  •