0% found this document useful (0 votes)
17 views

Write a c Program to Print

Uploaded by

harshvyas9928
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Write a c Program to Print

Uploaded by

harshvyas9928
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

C Language programs for file

1. Write a c program to print “Welcome to C Programming”.


2. Write a program to print courses name running in your college with different formats using escape sequences.
3. Write a Program to print different data types in ‘C’ and their ranges.
4. Write a Program to initialize, assignment & printing values of variables of different data types.
5. Write a c program to print sum to two integer and real numbers.
6. Write a c program to read principal amount, rate, and time and calculate simple interest.
7. Write a program to demonstrate arithmetic operators. (Addition, subtraction, multiplication, division and remainder).
8. Write a c program to read breadth and height and calculate area of triangle.
9. Write a Program to read radius value from the keyboard and calculate the area of circle.
10. Write a Program to read seconds and print minutes and hours.
11. Write a Program to convert temperature. (Fahrenheit – Centigrade and vice-versa).
12. Write a Program to initialize, assignment values in variable and swap them.
13. Write a Program to demonstrate logical operators. (Logical AND, logical OR, NOT).
14. Write a Program to input two numbers and demonstrate relational operators. (<, <=,>, >=, ==, !=).
15. Write a Program to input two numbers from keyword and demonstrate Conditional operator.
16. Write a Program to demonstrate Compound assignment operator. (=,+=,-=,*=,/=,%=).
17. WAP to demonstrate pre-increment and post-increment. (++m, n++ where m and n are a values to be initialized).
18. WAP to demonstrate pre-decrement and post-decrement. (--j, k-- where j and k are a value to be input by the user).
19. Write a Program to input values by user and demonstrate bitwise operators. (Bitwise AND, Bitwise OR, Bitwise Exclusive OR,
Left shift, Right Shift and one’s complement.
20. Write a Program to convert following: Kilo meter to Centimeter and Inch to fit.
21. Write a Program to find greater number using if statement.
22. WAP to input number and check entered number is positive, negative and zero using if statement.
23. Write a Program to check entered year is leap or not using if else statement.
24. Write a Program to find greater number using if else statement.
25. Write a Program to check entered number is even or odd using if else statement.
26. Write a Program to find largest among three numbers using nested if statement.
27. WAP to input number and check entered number is positive, negative and zero using nested if statement.
28. WAP to read marks of a student in five subjects and print division whether first or second or third or fail using else if ladder.
29. WAP to read number and convert no. in words using else if ladder.
30. WAP to Add, subtract, multiply, divide and remainder of two numbers using switch case.
31. WAP to check the entered character is vowel or consonant using switch case.
32. Write a Program to print your name five times using for loop.
33. WAP to read value of N and print N to 1 numbers using for loop.
34. WAP to read value of N and calculate sum of N numbers using for loop.
35. WAP to read values of Min and Max and print odd number series and sum of them using for loop.
36. Write a c program to print prime numbers in the given range using for loop.
37. Write a program to display multiplication tables from 1 to 10 except 3 and 6.
38. WAP to read value of N and print factorial of N using for loop.
39. Write a program to print the Fibonacci series for given ‘N’ value using while loop.
40. WAP to read value of N and print table of N using while loop.
41. Write a program to get number and calculate sum of individual digits of a given number using for loop.
42. WAP to read value of N and print even number series using while loop.
43. WAP to read value of N and print average of N numbers using while loop.
44. Write a program to display multiplication tables from 5 to 15 except 10.
45. Write a program to print J to A with tabs using while loop.
46. Write a program to print 10 to 2 with new line using do while loop.
47. Write a program to input value of N and print 0 to N series and sum using do while loop.
C Language programs for file
48. Write a program to input value of N and print reverse table of N with two space using do while loop.
49. Write a program to input value of N and print odd number series using do while loop.
50. Write a c program to print the following pattern using nested for loop-
***
**
*
51. Write a c program to print the following pattern-
*
**
***
52. Write a c program to print the following pattern-
***
**
*
53. Write a c program to print the following pattern-
*
**
***
54. Write a c program to print the following pattern-
1
12
123
55. Write a c program to print the following pattern-
1
23
456
56. Write a c program to print the following pattern-
CCC
BB
A
57. Write a c program to print the following pattern-
F
ED
CBA
58. Write a c program to print the following pattern-
* * *
* *
*
59. Write a c program to print the following pattern-

*
* *
C Language programs for file
* * *
* * * *
60. Write a c program to print the following pattern-

A
B B
C C C
B B
A
61. WAP to store 5 elements in the 1-D array and print each element and average and sum of the array.
62. WAP to print minimum and maximum elements in the 1-D array.
63. Write a program to count no. of positive numbers, negative numbers and zeros in the array.
64. Write a program to search the given elements.
65. Write a program to sort the given elements.
66. WAP to input two 3x3 matrix and print addition.
67. WAP to input two 4x3 matrix and print subtraction.
68. WAP to input two 2x2 matrix and print multiplication.
69. Write a program to input 3x2 matrix and print the transpose of a matrix.
70. Write a program to find area of rectangle using functions.
71. Write a program to calculate simple interest using functions without arguments, without return type.
72. Write a program to find difference of two numbers using functions without arguments, with return type.
73. Write a program to find sum of two numbers using functions with arguments & without return type.
74. Write a program to find product of two numbers using functions with arguments, with return type.
75. Write a program to swap two numbers using Call By Value.
76. Write a program to swap two numbers using Call By Reference.
77. Write program to find sum, product of two numbers using pointer.
78. Write a program for matrix addition using pointers.
79. Write a program to calculate factorial using recursion functions.
80. Write a program to perform various string manipulations using built-in functions.
81. Write a program to print the given strings in ascending order.
82. Write a program to verify the given string is palindrome or not (without built-in functions, with using built-in functions).
83. Write a program to concatenate two strings using arrays.
84. Write a program to read and display a value using getch() and putch().
85. Write a program to read and display a value using getchar(), putchar().
86. Write a program to read and display a value using gets() and puts().
87. Write a program to read values from keyboard and find the values using abs(), sqrt(), floor(), ceil() and pow().
88. Write a program to create structure for an account holder in a bank with following Fields: name, account number, address,
balance and display the details of five account holders.
89. Write a program to find total marks of individual student and average marks for 10 students using structures.
90. Write a program to create structure called traveler and members of structure are train no, coach no, seat no, source,
destination, gender, age, name and departure date.
91. Write a program to illustrate passing a structure to a function.
92. Write a program to create file using command line arguments.
93. Write a program which copies the contents of one file to another file using command line arguments.
94. Write a program to reverse the first n characters in a file using command line arguments.

You might also like