Posts

Showing posts with the label PROGRAMS

PROGRAMS

  C programs are frequently asked in the interview. These programs can be asked from basics, array, string, pointer, linked list, file handling etc. Let's see the list of c programs. 2) Prime number Write a c program to check prime number. Input: 44 Output: not prime number Input: 7 Output: prime number 3) Palindrome number Write a c program to check palindrome number. Input: 329 Output: not palindrome number Input: 12321 Output: palindrome number 4) Factorial Write a c program to print factorial of a number. Input: 5 Output: 120 Input: 6 Output: 720 5) Armstrong number Write a c program to check armstrong number. Input: 153 Output: armstrong Input: 22 Output: not armstrong 6) Sum of Digits Write a c program to print sum of digits. Input: 234 Output: 9 Input: 12345 Output: 15 7) Reverse Number Write a c program to reverse given number. Input: 123 Output: 321 8) Swap two numbers without using third variable Write a c ...