PROGRAMMING QUESTIONS
PROGRAMMING QUESTIONS
Write a C program to find maximum between three numbers using conditional operator.
Write a C program to check whether a number is even or odd using conditional
operator.
Write a C program to check whether year is leap year or not using conditional
operator.
Write a C program to check whether character is an alphabet or not using
conditional operator.
BITWISE EXERCISE
Write a C program to check Least Significant Bit (LSB) of a number is set or not.
Write a C program to check Most Significant Bit (MSB) of a number is set or not.
Write a C program to get nth bit of a number.
Write a C program to set nth bit of a number.
Write a C program to clear nth bit of a number.
Write a C program to toggle nth bit of a number.
Write a C program to get highest set bit of a number.
Write a C program to get lowest set bit of a number.
Write a C program to count trailing zeros in a binary number.
Write a C program to count leading zeros in a binary number.
Write a C program to flip bits of a binary number using bitwise operator.
Write a C program to count total zeros and ones in a binary number.
Write a C program to rotate bits of a given number.
Write a C program to convert decimal to binary number system using bitwise
operator.
Write a C program to swap two numbers using bitwise operator.
Write a C program to check whether a number is even or odd using bitwise operator.
Write a C program to print all natural numbers from 1 to n. - using while loop
Write a C program to print all natural numbers in reverse (from n to 1). - using
while loop
Write a C program to print all alphabets from a to z. - using while loop
Write a C program to print all even numbers between 1 to 100. - using while loop
Write a C program to print all odd number between 1 to 100.
Write a C program to find sum of all natural numbers between 1 to n.
Write a C program to find sum of all even numbers between 1 to n.
Write a C program to find sum of all odd numbers between 1 to n.
Write a C program to print multiplication table of any number.
Write a C program to count number of digits in a number.
Write a C program to find first and last digit of a number.
Write a C program to find sum of first and last digit of a number.
Write a C program to swap first and last digits of a number.
Write a C program to calculate sum of digits of a number.
Write a C program to calculate product of digits of a number.
Write a C program to enter a number and print its reverse.
Write a C program to check whether a number is palindrome or not.
Write a C program to find frequency of each digit in a given integer.
Write a C program to enter a number and print it in words.
Write a C program to print all ASCII character with their values.
Write a C program to find power of a number using for loop.
Write a C program to find all factors of a number.
Write a C program to calculate factorial of a number.
Write a C program to find HCF (GCD) of two numbers.
Write a C program to find LCM of two numbers.
Write a C program to check whether a number is Prime number or not.
Write a C program to print all Prime numbers between 1 to n.
Write a C program to find sum of all prime numbers between 1 to n.
Write a C program to find all prime factors of a number.
Write a C program to check whether a number is Armstrong number or not.
Write a C program to print all Armstrong numbers between 1 to n.
Write a C program to check whether a number is Perfect number or not.
Write a C program to print all Perfect numbers between 1 to n.
Write a C program to check whether a number is Strong number or not.
Write a C program to print all Strong numbers between 1 to n.
Write a C program to print Fibonacci series up to n terms.
Write a C program to find all prime numbers between given interval using functions.
Write a C program to print all strong numbers between given interval using
functions.
Write a C program to print all Armstrong numbers between given interval using
functions.
Write a C program to print all perfect numbers between given interval using
functions.
ARRAY EXERCISES
MATRICES EXERCISES
STRING EXERCISE
POINTERS EXERCISE
Write a C program to create a file and write contents, save and close the file.
Write a C program to read file contents and display on console.
Write a C program to read numbers from a file and write even, odd and prime numbers
to separate file.
Write a C program to append content to a file.
Write a C program to compare two files.
Write a C program to copy contents from one file to another file.
Write a C program to merge two file to third file.
Write a C program to count characters, words and lines in a text file.
Write a C program to remove a word from text file.
Write a C program to remove specific line from a text file.
Write a C program to remove empty lines from a text file.
Write a C program to find occurrence of a word in a text file.
Write a C program to count occurrences of a word in a text file.
Write a C program to count occurrences of all words in a text file.
Write a C program to find and replace a word in a text file.
Write a C program to replace specific line in a text file.
Write a C program to print source code of same program.
Write a C program to convert uppercase to lowercase character and vice versa in a
text file.
Write a C program to find properties of a file using stat() function.
Write a C program to check if a file or directory exists.
Write a C program to rename a file using rename() function.
Write a C program to list all files and sub-directories recursively.