Ui 22 Cs 57
Ui 22 Cs 57
1.) C Program to Swap Two Numbers with function and without function,
without using third variable.
ALGORITHM
3.) C Program to Find the Size of int, float, double, and char.
ALGORITHM
Start the program.
Use the sizeof operator to determine the size of each data type:
int, float, double, and char.
Display the size of each data type in bytes.
End the program.
4.) C Program to Add Two Complex Numbers.
ALGORITHM
Start the program.
Declare variables to store the real and imaginary parts of both
complex numbers, as well as variables to store the real and imaginary
parts of the result.
Read the real and imaginary parts of the first complex number from
the user.
Read the real and imaginary parts of the second complex number
from the user.
Add the real parts of both complex numbers and store the result in
the variable for the real part of the result.
Add the imaginary parts of both complex numbers and store the
result in the variable for the imaginary part of the result.
Display the sum of the complex numbers in the format: real_part +
imaginary_part i..
OUTPUT
OUTPUT
CODE
OUTPUT