Professional Documents
Culture Documents
Lab 10 2023 24
Lab 10 2023 24
Q1. Write a C program where the user is asked to enter the start time and the stop time.
Store the two time periods in the structure variables (in hours, minutes and seconds format)
and pass them to the user defined function and calculate the time interval between them.
Output:
Q3. Write a C program that takes two strings as input and concatenates them in another
string and displays the concatenated string. Do not use strcat function from string.h file.
Write your own code to do this as shown below:
Output:
Q4. Write a C Program to reverse alternate characters of a string without using pointers
as shown below:
Output:
Extra Problem: Write a C program to create a structure named Date. The structure should have day,
month and year as inputs. Store the current date in the structure. Take inputs ‘x’ from the user where x
is the number of days. Add x to current date and display the final date. Also, consider leap years.