37.jofin Joy. C
37.jofin Joy. C
37.jofin Joy. C
AIM
Read two input each representing the distances between two points in the
Euclidean space,
store these in structure variables and add the two distance values.
ALOGRITHM
STEP_1 – start
STEP_2 – Define a structure named point with two integer members x,y and also
declare
STEP_3 – In main function ....read the first point and store it in p1.
STEP_7 -- Stop
PROGRAM
OUTPUT
RESULT
THE PROGRAM HAS BEEN EXECUTED SUCCESSFULLY AND THE OUTPUT IS VERIFIED
EXPERIMENT NO 11
AIM
Using structure, read and print data of n employees (Name, Employee Id and
Salary)
ALGORITHM
STEP_1 – Start
PROGRAM
OUTPUT
RESULT
THE PROGRAM HAS BEEN EXECUTED SUCCESSFULLY AND THE OUTPUT IS VERIFIED
EXPERIMENT N0 12
AIM
Declare a union containing 5 string variables (Name, House Name, City Name,
State and Pin code)
each with a length of C_SIZE (user defined constant). Then, read and
ALGORITHM
STEP_1—Start
PROGRAM
OUTPUT
EXPERIMENT NO 13
AIM
Find the factorial of a given Natural Number n usingrecursive and non recursive
functions
ALGORITHM
STEP_1--Start
STEP_2--Define functions factnr and factr to calculate the factorials
using the non-recursive and recursive functions respectively
STEP_3--Input the number whose factorial is to be calculated from the
user
STEP_4--Using the functions, calculate and print the factorials
STEP_5--Stop
PROGRAM
OUTPUT
RESULT
THE PROGRAM HAS BEEN EXECUTED SUCCESSFULLY AND THE OUTPUT IS VERIFIED
EXPERIMNT NO 1 4
AIM
Read a string (word), store it in an array and obtain its reverse by using a user
defined function.
ALGORITHM
STEP_1—Start
PROGRAM
OUTPUT
RESULT
THE PROGRAM HAS BEEN EXECUTED SUCCESSFULLY AND THE OUTPUT IS VERIFIED
EXPERIMENT N0 16
AIM
Do the following using pointers i) add two numbers ii) swap two numbers using a
user defined function.
ALGORITHM
1. Start
PROGRAM
OUTPUT
RESULT
THE PROGRAM HAS BEEN EXECUTED SUCCESSFULLY AND THE OUTPUT IS VERIFIED
EXPERIMENT N0 17
AIM
ALGORITHM
STEP_1--Start
STEP_2--Initialize an array and obtain its size from the user
STEP_3--Initialize an integer pointer that points to the first element of
the array
STEP_4--Using a loop, input the values of the array and store them
using the pointer
STEP_5--Using another loop, print the values of the array using the
pointer
STEP_6--Stop
PROGRAM
OUTPUT
RESULT
THE PROGRAM HAS BEEN EXECUTED SUCCESSFULLY AND THE OUTPUT IS VERIFIED