1. WAP to display hello message. 2. WAPC to declare an integer type variable and initialize it at compile time. 3. WAPC to declare a float type variable and initialize it at compile time. 4. WAPC to declare a character type variable and initialize it at compile time. 5. WAPC to declare an integer type variable and initialize it at run time using scanf(). 6. WAPC to declare a float type variable and initialize it at run time using scanf(). 7. WAPC to declare a character type variable and initialize it at run time using scanf(). 8. WAPC to display the contents of an integer type variable using printf(). 9. WAPC to display the contents of a float type variable using printf(). 10. WAPC to display the contents of a character type variable using printf(). 11. WAPC to show the use of arithmetic operators a. Addition b. Subtraction c. Multiplication d. Division e. Modulo Division On Following Types of Data a. Integer Type Data b. Floating Point Type Data 12. WAPC to show the use of increment and decrement operator on integer type data with a. Postfix Mode b. Prefix Mode 13. WAPC to show the use of relational operators to display the relationship on the current values of the integer type variables. a. > b. < c. >= d. <= e. == 14. WAPC to show the use of logical operators a. && b. || c. ! To Test d. Greatest among three integer type values assigned to corresponding variables. e. Greater among three integer type values assigned to corresponding variables. f. The inequality between two integer type values assigned to corresponding variables. 15. WAPC to find the greatest and smallest among three float type data using conditional operator. 16. WAPC to read and write character type data without using printf() and scanf() . 17. WAPC to read a character from the keyboard and check whether it is a digit or letter and print the corresponding message. 18. WAPC to display the following cross-list. Roll Name Sub1_Marks Sub2_Marks Sub3_Marks Sub4_Marks Sub5_Marks
19. WAPC to test whether the first number is greatest.
20. WAPC to test whether the first number is greatest or not. 21. WAPC to find and display the greatest among three numbers. 22. WAPC to find and display the smallest among three numbers. 23. WAPC to generate the multiplication table of the user specified integer type value. 24. WAPC to design compound interest calculator. 25. WAP to generate the following pattern a. 1111 1111 1111 1111 b. 1234 1234 1234 1234 c. 1234 5678 9101112 13141516 d. 1 12 123 1234 e. 1 12 123 1234 12345 f. 1 21 321 4321 54321 g. 1 123 12345 1234567 h. 1 12 123 1234 12345 i. ***** ***** ***** ***** j. * ** *** **** ***** k. * ** *** **** ***** l. * * ** ** *** *** **** **** ********* m. * *** ***** ******* n. * *** ***** ******* ***** *** * 26. WAPC to read heights of 10 unique persons and display the highest height. 27. WAPC to read salary of 10 unique employees and find the mean salary as well as minimum and maximum salary deviation. 28. WAPC to read two strings and compare them. 29. WAPC to read two different strings and concatenate them. 30. WAPC to define an integer type function swap() to swap two values passed as argument. 31. WAPC to define a method armstrong() to check whether the given number is armstrong or not using the concept of call by reference. 32. WAPC to implement the following structure. Student having following attributes a. Roll Number b. Name c. Class d. Session 33. WAPC to open a file in write mode and write some content in it. 34. WAPC to open the file created in above program and read its contents and display it onto the monitor. 35. WAPC to open two files one it read mode and other in write mode. Read the contents of one file and write the same onto other file and then display the read and write contents. Assignment Number 2 on ‘C’
SL. No. Program
1. WAP to print the sum and product of digits of an integer. 2. WAP to reverse a number. 3. WAP to compute the sum of the first n terms of the following series S = 1+1/2+1/3+1/4+… 4. WAP to compute the sum of the first n terms of the following series S =1-2+3-4+5……………. 5. Write a function that checks whether a given string is Palindrome or not. Use this function to find whether the string entered by user is Palindrome or not. 6. Write a function to find whether a given no. is prime or not. Use the same to generate the prime numbers less than 100. 7. WAP to compute the factors of a given number. 8. WAP to print a triangle of stars as follows (take number of lines from user): * *** ***** ******* ********* 9. WAP to perform following actions on an array entered by the user: a. Print the even-valued elements b. Print the odd-valued elements c. Calculate and print the sum and average of the elements of array d. Print the maximum and minimum element of array e. Remove the duplicates from the array f. Print the array in reverse order The program should present a menu to the user and ask for one of the options. The menu should also include options to re-enter array and to quit the program. 10. WAP that prints a table indicating the number of occurrences of each alphabet in the text entered as command line arguments. 11. Write a program that swaps two numbers using pointers. 12. Write a program in which a function is passed address of two variables and then alter its contents. 13. Write a program which takes the radius of a circle as input from the user, passes it to another function that computes the area and the circumference of the circle and displays the value of area and circumference from the main() function. 14. WAP to display Fibonacci series a. Using Recursion b. Using Iteration 15. WAP to calculate Factorial of a number a. Using Recursion b. Using Iteration 16. WAP to calculate GCD of two numbers a. With Recursion b. Without Recursion