Basic to Easy C Programming Questions
Topics: C Basics, Arrays, Pointers, Functions, Loops
(Note: Each question should be solved using functions in C)
1. Write a C program to print 'Hello World' using a function.
2. Write a C function to add two integers and return the result.
3. Write a C function to find the maximum of two numbers.
4. Write a C function to check whether a given number is even or odd.
5. Write a C function to calculate factorial of a number.
6. Write a C function to find the sum of all elements in an array.
7. Write a C function to find the largest element in an array.
8. Write a C function to count even and odd numbers in an array.
9. Write a C function to reverse an array.
10. Write a C function to search for an element in an array.
11. Write a C function to swap two numbers using pointers.
12. Write a C function to find the length of a string using pointers.
13. Write a C function to copy a string using pointers.
14. Write a C function to find the sum of array elements using pointers.
15. Write a C function to find the minimum element in an array using pointers.
16. Write a C function to calculate the square of a number.
17. Write a C function to check if a number is prime.
18. Write a C function to calculate the GCD of two numbers.
19. Write a C function to check if a number is palindrome.
20. Write a C function to generate Fibonacci series up to n terms.
21. Write a C function to print all natural numbers from 1 to n using loop.
22. Write a C function to print multiplication table of a given number.
23. Write a C function to count digits of a number.
24. Write a C function to calculate sum of digits of a number.
25. Write a C function to reverse a given number.