Day of the Week from a Date of Birth in C

Problem Statement Write a C program to find the day of the week from a date of birth. For example, given 02/04/2017 (2nd April 2017), the program should tell you it was a Sunday. The Approach Pick a base year whose January 1st is a known weekday. We use 1900 (Jan 1, 1900 was a …

C Program to compute the difference between two dates.

Write a C program to compute the difference between two dates.In this C Program, We check the date is valid or not and then calculating the No. of days of first date and second date from Jan 1 of first date, then subtract the smaller date from another. Read more about C Programming Language . …

C Program to convert days to years, weeks and days

This program converts a given number of days into years, weeks, and remaining days using integer division and modulo arithmetic. The formula uses 365 days per year and 7 days per week (leap years are ignored). It is a straightforward exercise in chained division and remainder operations. The original post used void main() and broken …