Sie sind auf Seite 1von 6

1.

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

hello! welcome to c language

==========================
======================
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

given number is not armstrong


==========================
========
16. program output
16.program output
program for with out parameters
displaying message using function
This is display function
==========================
=======
17.program output
program for with out parameters
displaying message using function
This is display function
output result 50
==========================
=======
18. program output
program for sorting the array
Enter array size
5
enter 5 elements20
4
30
50
15
Given Array is
20 4 30 50 15
Sorted Array is
4 15 20 30 50
==================
19. program output
program for matrix addition
Enter Matrix a values
a[1][1] = 1
a[1][2] = 1
a[1][3] = 1
a[2][1] = 1
a[2][2] = 1
a[2][3] = 1
a[3][1] = 1

program for mathematical table


enter number
15
mathematical table is
15 * 1 = 15
15 * 2 = 30
15 * 3 = 45
15 * 4 = 60
15 * 5 = 75
15 * 6 = 90
15 * 7 = 105
15 * 8 = 120
15 * 9 = 135
15 * 10 = 150
==========================
============
12. program output
program of quatratic equation
enter a,b,c values
10
5
2
The Roots are -0.250000
0.250000
==========================
================
13. program output
program reversing of a number
enter number
1254
given number is not polindrome
==================
14. program output
Program for string polindrom
Enter Text
2

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

reverse number is 541


==========================
==========
22. program output
program for matrix multiplication
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
0
0
0
6
4
4
10
8
8
==========================
========
23. program output
Program for Swapping Numbers
Before swapping a,b values are a=20
b=30
after swapping a,b values are a=30 b=20
==========================
============
24. program output
program for structure demonstration
Enter data into structure id,name
20
raju
structure data is 20 raju
==========================
==============
25. program output
program to demonstrate fputs
File Opened enter textthis is anil from ndc
data stored sucess

==========================
==================
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

Number of characters are : 66


Number of words are : 13
Number of lines are : 4
Number of special characters are : 0
==========================
====
28 a) program output
program for mathmatical functions
enter a number to find square root value
25
square root value is 5.000000
enter a number to find log value
5
2
log value is 1.609438
==========================
============
28 b) PROGRAM OUTPUT
union program
enter std rno
25
student roll no is 25
enter std name
RAJU
student name is RAJU
==========================
==========
4

20 bytes memory allocated


20 bytes memory allocated
enter text
this c language
Enter Another Text
welcome
Entered Data is
this c language
welcome
Reallocating first string memory
Enter text into str1
this is anil
Entered Text is
this is anil
==========================
=================
33. program output
Enter three Numbers
30
50
60
Maximum Number is 60
==========================
===============
34. program output
program for Maximum Number
enter Numbers
20
10
45

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
==========================
=====

Das könnte Ihnen auch gefallen