Programming Exercises
C Programming & Web Technology
I. C Programming Exercises
Sequential Program
S.N. Program Title
1 WAP to display your Name, age and address
2 WAP to find area of a circle
3 WAP to find circumference of a circle
4 WAP to find Area of Rectangle
5 WAP to find Area of Square
6 WAP to Calculate S.I.
WAP to read marks of 5 subjects and calculate total marks and
7
percentage
Conditional Statement
S.N. Program Title
8 WAP to read a no. if it is +ve or -ve
9 WAP to read a marks in sub and decide if a student is pass or fail.
10 WAP to read a no. and decide if it is odd or even.
11 WAP to read a no. if it is divisible by 3 or not.
12 WAP to read if two number are equal or not.
WAP to read two no. and find greatest among them. and also check if
13
they are equal.
WAP to read three no. and find the smallest no. among them and also
14
check if they are equal.
WAP to read marks of 5 subs and display the grade of students based on
15
the percentage obtained.
Switch Case
S.N. Program Title
16 WAP to display name of days of a week.
WAP to perform addition, subtraction, multiplication and division
17
operation based on character input provided.
18 WAP to check if an alphabet is vowel or constant using switch case.
Looping Statement
S.N. Program Title
19 WAP to display n natural numbers
20 WAP to display 1st n odd numbers.
21 WAP to display even number upto n.
22 WAP to display factorial of a number provided.
23 WAP to display sum of n numbers.
24 WAP to display product of odd no. upto n.
25 WAP to display fibonacci series.
26 WAP to check if number is prime or composite.
WAP to display the following series also find the sum of it (1, 2, 4, 7, 11,
27
16, 22 --- nth term)
28 WAP to display multiplication table of any number.
29 WAP to swap two number.
30 WAP to read a number and display it in reverse order using while loop.
31 WAP to check if a number is palidrone or not.
32 WAP to count number of digits in number.
33 WAP to calculate the sum of digits in number.
34 WAP to read a number & check if it is armstrong or not.
35 WAP to display prime number upto n.
WAP to display given pattern.
1
1 2
36
1 2 3
1 2 3 4
1 2 3 4 5
WAP to display given pattern.
*
* *
37
* * *
* * * *
* * * * *
WAP to display given pattern.
5 5 5 5 5
4 4 4 4
38
3 3 3
2 2
1
39 WAP to display the given series 1, 12, 123, 1234, 12345, --- nth term.
40 WAP to find reverse of a number using do-while loop.
Array
S.N. Program Title
41 WAP to check Armstrong no. using do-while loop.
42 WAP to read Salary of n employes and count Salary greater than 60,000.
43 WAP to read age of 20 sts. and count number of students of age 16.
44 WAP to read 50 numbers and calculate sum and average of it.
45 WAP to read weight of 40 person and find the heaviest weight.
46 WAP to sort an array in ascending order.
47 WAP to sort an array in descending order.
48 WAP to display a matrix of order 3x3.
49 WAP to add two matrices of order mxn.
50 WAP to subtract two 3x3 order matrices.
51 WAP to find transpose of a matrix.
52 WAP to check if 2 matrices are equal or not.
String
S.N. Program Title
53 WAP to calculate the length of string.
54 WAP to concatenate two string.
55 WAP to reverse a string.
56 WAP to copy value of one string to another.
57 WAP to compare if two strings are equal or not.
58 WAP to check if a string is palidrone or not.
59 WAP to read name of 100 employees and display them.
60 WAP to read string and convert it to uppercase.
II. Web Technology Exercises
S.N. Task Description
Create a simple HTML form to accept user details such as Name, Email,
1
Password, and Gender. Include submit and reset button.
Create an HTML form for a feedback page that includes Name, Email,
2
Rating (1-5), and comments a submit button.
Create an HTML table to displays the details of 5 students with columns
3
Roll no., Name, Age, and marks.
Create a webpage that displays an ordered list of your 5 favourite
4
subjects and unordered list of your 5 favourite hobbies.
Create a webpage and apply basic CSS to change the background color,
5
text color, and font size of a heading and paragraph.
Create a webpage with multiple paragraphs and apply CSS to set different
6
text alignments (left, corner, right) for each paragraph.
Create a webpage with links, images, and a navigation menu - style the
7
links with different colors for normal, hover, and visited states using CSS.