You are on page 1of 1

C Programming Practice Assignment

1. WAP to print half pyramid, inverted pyramid, full pyramid, Pascal's triangle,
and Floyd's triangle in C Programming.

2. i) WAP to find the sum of natural numbers using a recursive function.


ii) WAP to display Armstrong numbers between two intervals.
iii) Write a C program to swap first and last digits of a number using while
loop.
iv) Write a C program to print total number of days in a month (the month
should be user input) using switch case.

3. i) Write a C program to find second largest element in an array.


ii) Write a C program to copy all elements from an array to another array.
iii) Write a C program to sort even and odd elements of array separately.

4. i) Write a C program to count total number of words in a string.


ii) Write a C program to replace all occurrences of a character with another
in a string.
iii) Write a C program to input any string from user and find the first
occurrence of a given character in the string.

You might also like