0% found this document useful (0 votes)
18 views

Questions

The document lists 33 C programming exercises including writing programs to print 'Hello World', perform basic math operations, sort and search arrays, use structures, and more.

Uploaded by

Sagar Thakur
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Questions

The document lists 33 C programming exercises including writing programs to print 'Hello World', perform basic math operations, sort and search arrays, use structures, and more.

Uploaded by

Sagar Thakur
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

1. WAP program to print ”Hello, World!”.

2. WAP to add two numbers entered by user.


3. WAP to subtract from higher to lower value entered by user (User could
enter randomly).

4. WAP to compare three numbers and find greatest and lowest.


5. WAP to find the roots of quardatic equation.
6. WAP to check factorial of a number entered by user.

7. WAP to create Fibonacci sequence up to 100.


8. WAP to check is the given number is prime or not.
9. WAP to find sum of elements in an array.
10. WAP to demonstrate the use of the (address of) and *(value at address)
operators.
11. WAP to add two numbers using pointers.
12. WAP to print all the alphabets using a pointer
13. WAP to store n elements in an array and print the elements using a pointer

14. WAP to reverse an array.


15. WAP to search an element exists on array or not?
16. WAP to store prime numbers in an array.
17. WAP to store points of a triangle entered by user.

18. WAP to print


* 1 5 12345 1
** 12 45 2345 212
*** 123 345 345 32123
**** 1234 2345 45 4321234
***** 12345 12345 5 543212345

19. WAP to sort an array in ascending order.

20. WAP to insert an element into an array.


21. WAP to delete an element from an array.
22. WAP to find the GCD (Greatest Common Divisor) of two numbers.

1
23. WAP to find the LCM (Least Common Multiple) of two numbers.
24. WAP to swap two variables without using a third variable.
25. WAP to find factorial of a given number using recursion.
26. WAP to swap two variables using reference.

27. WAP to demonstrate pass-by-value and pass-by-argument.


28. WAP to reverse a string using both user-defined and library function.
29. WAP to copy string using user-defined function.

30. WAP to concatenate two strings given by user.


31. WAP create structure with item id(int), name(string), marks(float) and
take input from user.
32. Define a structure named Time with members hours, minutes, and sec-
onds. Write a C program to input two times, add them, and display the
result in proper time format.
33. Define a structure named ”Date” with members day, month, and year.
Write a C program to input two dates and find the difference in days
between them.

You might also like