GOVERNMENT POLYTECHNIC COLLEGE,ATTINGAL
DEPARTMENT OF COMPUTER HARDWARE ENGINEERING
S2 COMPUTER ENGINEERING
2139 - Problem Solving and Programming Lab Cycle
EXPERIMENT
1. Write a C program to print Hello World
2.Write a C program to add two numbers (2 and 6) and display its sum.
3. Write a C program to read two numbers from keyboard and display its sum.
4.Write a C program to find sum and average of three numbers.
5.Write a C program to calculate area and circumference of a circle.
6. Write a C program to perform addition, subtraction, division(quotient and remainder) and
multiplication of two numbers.
7. Write C program to evaluate each of the following equations
8. Write a program to calculate simple and compound interest.
9. Write a program to swap values of two variables using a third variable.
10. Write a program to swap values of two variables without using a third variable.
11. Write a program to read age from the user and check whethet he/she is eligible to vote using
conditional operator
12. . Write a C program to check whether a number is positive or negative using ternary operator
13. Write a program to find the largest of two numbers using if-else statement
14. Write a program to check whether a number is even or odd using if else statement.
15. Write a C program to check whether a number is divible by both 3 and 9.
16. Write a program to check whether the entered year is leap year or not (a year is
leap if it is divisible by 4 and divisible by 100 or 400.)
17. Write a C program to find the roots of a quadratic equation.
18. Write a C program to determine whether the character entered is Vowel or Consonant.
19. Write a C program to find the largest of three numbers.
20. Write a program to compute grade of students using if else adder. The grades are
assigned as followed:
21. Write a program to determine whether the input character is capital or small letter,digits or special
symbol.
22. Write a program to print positive integers from 1 to 10.
23. Write a C program to find the sum of first N natural numbers.
24. Write a C program to find the factorial of a number
25. Write a C program to print the multiplication table of a number.
26. Write a C program to print even numbers from 2 to a given limit.
27. Write a C program to print the numbers divisible by 5 upto a given limit.
28. Write a C program to find the GCD of two numbers
29. Write a C program to generate all the prime numbers between 1 and n, where n is a value supplied
by the user
Write a program to generate Fibonacci series.
30.Write C program to count the number of lines, words and characters in a given text
31.Write a C program to print the following pattern
32. Write a program to count number of digits in a given integer.
33. Write a program to reverse a given integer and check if it is palindrome or not
34. Write a program to check if a 3 digit number Is armstrong or not.
35. Write a program to print the sum of digits of a number using while loop.
36. Write a C program to print the day name using switch statement
37. Write a C program, which takes two integer operands and one operator from the user, performs
the operation and then prints the result.(Use switch)
38. Write a C program to check whether a character entered is vowel or consonant using switch
statement.
LAB EXAM NO 1
39. Write a C program to find the sum of two numbers using function
40. Write a C program to find the factorial of a number without using recursive function
41. Write a C program to find the factorial of a number using recursive function
42. Write a C program to calculate the following series
43. Write a C program to swap two values using call by value and call by reference method.
44. Write a program to insert 5 elements into an array and print the elements of the array
45. Write a Program to perform addition of all elements in Array
46. Write a Program to print even numbers in an Array
47. Write a Program to Search an element in array.
48. Write a Program to find the largest and smallest element in Array.
49. Write a Program to sort the elements in an Array.
50. Write a C program to find the frequency of a particular number in an array.
51. Write a program to accept a string and count the number of vowels present in this string.
52. Write a program to check if a string is palindrome or not.
53. Write a C program to read a matrix and display it
54. Write a C program to find th sum of two matrices.
55. Write a C program to find the transpose of a matrix.
LAB EXAM NO 2