Roundup of C Interview Programs

by Sridhar Jammalamadaka on September 10, 2009


c interview questionsRoundup of all Interview programs in Interview Mantra.

  1. Write a program to find factorial of the given number.
  2. Write a program to illustrate pass by value.
  3. Write a program to illustrate pass by reference.
  4. Write a program to check whether the given number is even or odd.
  5. Write a program to swap two numbers using a temporary variable.
  6. Write a program to swap two numbers without using a temporary variable.
  7. Write a program to swap two numbers using bitwise operators.
  8. Write a program to find the greatest of three numbers.
  9. Write a program to find the greatest among ten numbers.
  10. Write a program to check whether the given number is a prime.
  11. Write a program to check whether the given number is a palindromic number.
  12. Write a program to check whether the given string is a palindrome.
  13. Write a program to generate the fibonacci series
  14. Write a program in C to print “Hello World” without using semicolon anywhere in the code.
  15. Write a program in C to print a semicolon without using a semicolon anywhere in the code.
  16. Write a program to compare two strings without using strcmp() function.
  17. Write a program to concatenate two strings without using strcat() function.
  18. Write a program in C to delete a specific line from a text file.
  19. Write a program in C to replace a specified line in a text file.
  20. Write a program in C to find the number of lines in a text file.

About the Author:  Sridhar Jammalamadaka is the Editor of Interview Mantra. He's a typically non-typical Software Engineer from Pune, India. He likes entrepreneurship, web technologies and Micro Controller programming. He enjoys playing cricket and piano (but rarely does these activities). Through this website, he wishes to gather a large community of aspiring engineers, entrepreneurs and professionals from all parts of the globe. You can connect with him on Facebook - http://www.facebook.com/sridhar.j


2,250 readers have already subscribed to email updates!

Enter your email address:

  • Saurabh

    please tell me the code for following…..
    for the numbers suppose 10201…the output should be “Ten thousand two hundred and one” ……..and it should take any number from the keyboard……

  • Anagha

    If i=1 initially, could you tell me what the output of ++i++ would be? I tried executing it but it gave me errors.

Previous post:

Next post: