Beruflich Dokumente
Kultur Dokumente
program output
4. program output
program to demonstrate switch statement
1. add
2. sub
3.mul
select your choice
1
enter two values
20
30
addition value is 50
==========================
======================
2. program output
program to test even or odd
enter a number
25
Odd Number
==========================
=============
5. program output
program to find sum of factors
Enter a Number
25
Factors are
1
5
25
total sum is 31
==========================
======================
3. program output
program to print natural numbers
enter number
25
natural numbers are
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
==========================
===============
6. program output
program to find sum of digits of number
enter number
1458
the total sum is 18
==========================
================
7. program output
program for prime number
enter number
17
given number is prime
==========================
==============
8. program output
program to generate prime numbers
enter limit
20
prime numbers are
2
3
5
7
11
13
17
19
====================
9. program output
program for perfect number
==========================
==
1
Enter number
6
given number is perfect
madam
Given Text is
madam given text is poindrome
Reverse Text is
madam
============
15. program output
program for armstrong Number
Enter Number for armstrong
159
==========================
==
10.program output
program to find factorial value
Enter Number
5
Factorial value is 120
==========================
====
11.program output
a[3][2] = 1
a[3][3] = 1
Enter Matrix b values
b[1][1] = 1
b[1][2] = 1
b[1][3] = 1
b[2][1] = 1
b[2][2] = 1
b[2][3] = 1
b[3][1] = 1
b[3][2] = 1
b[3][3] = 1
Result matrix is
2
2
2
2
2
2
2
2
2
==========================
==================
20. program output
program for matrix subtraction
Enter Matrix a values
a[1][1] = 2
a[1][2] = 2
a[1][3] = 2
a[2][1] = 2
a[2][2] = 2
a[2][3] = 2
a[3][1] = 2
a[3][2] = 2
a[3][3] = 2
Enter Matrix b values
b[1][1] = 1
b[1][2] = 1
b[1][3] = 1
b[2][1] = 1
b[2][2] = 1
b[2][3] = 1
b[3][1] = 1
b[3][2] = 1
b[3][3] = 1
Result matrix is
1
1
1
1
1
1
1
1
1
==========================
========
21. program output
program reversing of a number
enter number
145
3
==========================
=====
26. program output
program for fgets
file opened
text is
this is anil from ndc
00B0 file closed
==========================
==
27. program output
program to count number of words, lines
Enter Text and end with $
Hi, this is anil
from Computers Department
welcome to c language
$
29 a. program output
union program
enter std rno
24
student roll no is 24
enter std name
anil
student name is anil
==========================
=======
29b program output
program to demonstrate pointers
enter a value
30
pointer variable value is 30
==========================
=======
30. program output
program to demonstrate enum data types
jan days=31
feb days=28
mar days=31
Apr days=30
may days=31
jun days=30
july days=31
aug days=30
sep days=31
nov days=31
dec days=30
==========================
==========
31. program output
program for fibonacci series
Enter Number
8
Fibonacci Series are
0
1
1
2
3
5
8
13
21
==========================
===========
32. program output
program for dynamic memory allocation
functions
a[3][1]= 2
a[3][3]= 2
The Given Matrix is
122
222
152
Trace of Matrix is 5
==========================
============
37. program output
program for fprintf
file opened
0data stored success
file closed
==========================
===========
38. program output
file opened successfully
file closed successfully
==========================
===
39. program output
=======================
40. program output
40. program output
program for putc function
file opened successfully, Enter data
Enter E to exit
welcome E
Data stored success
file closed
==========================
==========
41. program output
program for getc function
file opened successfully
Data is
c is largest45
==========================
===================
35. program output
Enter N and X values
10
2
Exponential Value is 0.042105
==========================
===============
36. program output
program for matrix trace
Enter Matrix elements
a[1][1]= 1
a[1][2]= 2
a[1][3]= 2
a[2][1]= 2
a[2][2]= 2
a[2][3]= 2
welcome
==========================
=====