0% found this document useful (0 votes)
5 views5 pages

Assignment Programs

The document outlines a programming assignment for students in the Department of CSE at Adhiyamaan College of Engineering, focusing on various tasks to be completed in C programming. It includes creating files, writing programs for mathematical calculations, data manipulation, and implementing algorithms. The assignment covers a wide range of topics, including input/output operations, control structures, functions, recursion, and file handling.

Uploaded by

ebazzartronic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views5 pages

Assignment Programs

The document outlines a programming assignment for students in the Department of CSE at Adhiyamaan College of Engineering, focusing on various tasks to be completed in C programming. It includes creating files, writing programs for mathematical calculations, data manipulation, and implementing algorithms. The assignment covers a wide range of topics, including input/output operations, control structures, functions, recursion, and file handling.

Uploaded by

ebazzartronic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Adhiyamaan College of Engineering

(Autonomous)
Department of CSE(Cyber Security)
222PPI06 Programming in C
Program Assignment

1. Create a new file io.c using vi. Write C statement(s) in io.c which produces the following
output
a. Good day!
b. Good /\ day!
c. He shared his “wisdom” with me
d. Hello
world! (using a single printf statement that has no blank space)
e. Hello
world! (using a single printf statement)
f. How are you?
I am OK.
g. How are you?
I am OK. (using two printf statements which have no blank spaces)
h. How are you?
I am OK. (using a single printf statement that has no blank space)
i. Something has gone crazy (with a beep sound)
2. Write a C program pri.c that produces the following output
*********
* *
* *
* *
* *
* *
* *
* *
* *
*********
3. Write a C program that calculates the total interest income on amount Rupees 5 lakhs in a
period of 10 years.. Assume that the interest rate is 3.5% per year.

4. Write a C program that accepts a distance in inches and prints the corresponding value in
cms. Note that 1 inch = 2.54 cm.

Test data and expected output:


Enter the distance in inches:3 Distance 3.00 inches is = 7.62 cms

5. Write a C program that reads two values from the keyboard, swaps their values and prints out
the result.

Test data and expected output:


Enter two real values to be swapped:2.4 5.7 Values entered are a=2.400000 and
b=5.700000 Values after swap are a=5.700000 and b=2.400000

6. Write a C program that accepts a temperature in Fahrenheit and prints the corre- sponding
temperature in Celsius.
Test data and expected output:

Enter temp in Farenheit:98.4


Temp 98.40 in Farenheit = 36.89 Centigrade

7. Write a C program to find Sum of First N Natural Numbers

Read a number N and find the sum of the first N natural numbers.

8. C program to find quotient and remainder

In this program, we will read divisor and dividend and then find the quotient and remainder,

results will be printed on the screen.

9. C program to find area and perimeter of a circle

10. C program to find area of a rectangle

11. Write a Program to calculate and display the volume of a CUBE having its

height (h=10cm), width (w=12cm) and depth (8cm).


12. Write a program to take input of name, rollno and marks obtained by a student in 4 subjects

of 100 marks each and display the name, rollno with percentage score secured

13. Write a C program to check the input data is odd or even using ternary operator, also print

the type of input.

14. Write a C program to check the input data is positive or negative using ternary operator

15. Write a C program to find the maximum number among two input data using ternary

operator

16. Program to check whether given number is even or odd

17. Program to check number is positive, negative or zero


18. Write a C program to read the value of an integer m and display the value of n is 1 when m
is larger than 0, 0 when m is 0 and -1 when m is less than 0.
Test Data : -5
19. Write a C program to find the largest of three numbers using nested if statement.
Test Data : 12 25 52

20. Write a C program to find the largest of three numbers using else ..if statement
Test Data : 12 25 52
21. To check whether letter is small, capital, digit or special symbol.

22. The current year and the year in which the employee joined the organization are entered
through the keyboard. 1) If the number of years for which the employee has served the
organization is greater than 3 then a bonus of Rs. 2500/- is given to the employee. 2) If the
years of service are not greater than 3, then the program should do nothing.

23. In a company an employee is paid as under:-


1. If his basic salary is less than Rs. 1500, HRA = 10% of basic salary and DA = 90% of
basic salary.
2. If his salary is either equal to or above Rs. 1500, then HRA = Rs. 500 and DA = 98% of
basic salary. If the employee’s salary is input through the keyboard write a program to find
his gross salary.

24. The marks obtained by a student in 5 different subjects are input through the keyboard. The
student gets a division as per the following rules:-
 Percentage above or equal to 60 - First Division
 Percentage between 50 and 59 - Second Division
 Percentage between 40 and 49 - Third Division
 Percentage less than 40 - Fail
Write a program to calculate the division obtained by the student.

25. Write a C program to determine eligibility for admission to a professional course based on
the following criteria: Go to the editor
Eligibility Criteria : Marks in Maths >=65 and Marks in Phy >=55 and Marks in
Chem>=50 and Total in all three subject >=190 or Total in Maths and Physics >=140
Input the marks obtained in Physics :65 Input the marks obtained in Chemistry :51 Input the
marks obtained in Mathematics :72 Total marks of Maths, Physics and Chemistry : 188
Total marks of Maths and Physics : 137
The candidate is not eligible.
26. Program to print words corresponding to numbers below 9
27. Program to print day of week by getting the order of the day.
28. Program to check whether the given character is vowel or consonant.
29. Program to perform arithmetic operations (+, -, *, %, /) by getting the operator as input,
using switch statement
30. Program to find factorial of a given number
31. Program to print odd and even numbers from 1 to 100
32. Program to find sum of any N numbers.
33. Program to find biggest and smallest among any 10 numbers without array concept.
34. Program to print any multiplication table upto 20 terms.
35. Program to print all prime numbers from 1 to N.
36. Program to print all Armstrong numbers from 100 to 1000
37. Program to print all perfect numbers from 1 to 100 (A perfect number is a positive integer
that is equal to the sum of its positive divisors, excluding the number itself.)
38. Program to count number of digit in a given number
39. Program to find all factors of a given number
40. while Statement
41. C program to print all uppercase and lowercase alphabets using while loop.
42. C program to print sum of digits of any given number
43. Write a C program to reverse the digits of given number.
44. Write a C program to print smallest and largest digit in given number
45. Write a C program to count number of odd digits in a given number.
46. Write a C program to find the largest and smallest element in an array
47. Write a C program to read 1ny 10 students marks in Maths subject and print the first three
toppers, using Bubble Sort
48. Write a C program to find the frequency of each element in an array.
49. Write a C program to remove duplicate elements from an array.
50. C program to merge two arrays in third array which is creating dynamically.
51. C program to accept Sorted Array and do Search using Binary Search
52.
53. 2D array
54. C program to add two Matrices.
55. C program to multiply two matrices
56. C program to print transpose of a matrix.
57. C Program to find Sum of all elements of each row of a matrix
58. C program to check a given matrix is a sparse matrix or not.
59. C program to calculate the sum of the series 1+(1+2) +(1+2+3) +(1+2+3+4) +...+(1+2+3+...
+n)
60. C program for sin(x) series
61. C program to find the sum of series 1^2/1! + 2^2/2! + 3^2/3! + 4^2/4! + ... n^2/n!.
62. C program to find the sum of series x + x/2! + x/4! + ... + x/n!
63. C program for cos(x) series.
64. C Program to calculate the mean, variance & standard deviation.
65. Write a C program to read your PAN number and check the format is correct or not
66. Write a C program to check the password and confirm password is same
67. Write a C program to read your current address and get the confirmation as current address
is same as permanent address, based on that perform the operation and print the permanent
address.
68. Write a C program to get your name and your father name and print the name as per your
Aadhar in uppercase letters
69. C program to find SUM and AVERAGE of two integer Numbers using User-defined
Functions
70. Write a C program to find cube of any number using function.
71. Write a C program to find diameter, circumference and area of circle using functions.
72. Write a C program to find maximum and minimum between two numbers using functions.
73. Write a C program to check whether a number is even or odd using functions.
74. Write a C program to check whether a number is prime, Armstrong or perfect number using
functions.
75. Write a C program to find all prime numbers between given interval using functions.
76. C program to find SUM and AVERAGE of two integer Numbers
77. Write a C program to find cube of any number using function.
78. Write a C program to find diameter, circumference and area of circle using functions.
79. Write a C program to find maximum and minimum between two numbers using functions.
80. Write a C program to check whether a number is even or odd using functions.
81. Write a C program to check whether a number is prime, Armstrong or perfect number using
functions.
82. Write a C program to find all prime numbers between given interval using functions.
83. Write a C program to swap any two integer using function
84. Write a C program to print maximum among three numbers using function
85. Write a function to find the sum of two numbers using call by reference.
86. Write a program to calculate the square of a number using call by reference.
87. Implement a function that swaps two characters using call by reference.
88. Write a function to double the value of a number using call by reference
89. Write a recursive function to find the factorial of a number.
90. Implement a recursive function to find the nth Fibonacci number.
91. Write a recursive function to calculate the sum of digits of a number.
92. Implement a recursive function to reverse a given number.
93. Write a recursive function to perform binary search on a sorted array.
94. Write a function to merge two arrays and return the merged array.
95. Implement a function to remove duplicate elements from an array.
96. Write a function to search for an element in an array using linear search.
97. Write a function to find the second largest element in an array.
98. Write a function to add two matrices using array passing.
99. Program to implement structure for a student
100. Program to implement union for a book
101. Sequential File access implementation
102. Random File access implementation
103. Implement Binary search algorithm using recursive function

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy