Author name: Amlendra

I am an embedded c software engineer and a corporate trainer, currently, I am working as senior software engineer in a largest Software consulting company . I have working experience of different microcontrollers (stm32, LPC, PIC AVR and 8051), drivers (USB and virtual com-port), POS device (VeriFone) and payment gateway (global and first data).

localtime function in C?

The localtime function in C converts the calendar time pointed to by the timer into a broken-down time, expressed as local time. The localtime function is present in the <time.h> header file.   Syntax of localtime: The prototype of the localtime () function is below: #include <time.h> struct tm *localtime(const time_t *timer);   Parameters: The

localtime function in C? Read More »

gmtime Function in C

The gmtime function in C converts the calendar time pointed to by the timer into a broken-down time, expressed as UTC. That means it uses the value of the time_t object to fill a tm structure with the values that represent the corresponding time, expressed in Coordinated Universal Time (UTC) or GMT timezone.   Syntax of

gmtime Function in C Read More »

difftime Function in C

The difftime() is a C Library function. It computes the difference between two calendar times (time1 – time0 ) in seconds. The difftime function is present in the <time.h> header file.   Syntax of difftime: The prototype of the difftime function is below: double difftime(time_t time1, time_t time0);   Parameters: The difftime function takes two

difftime Function in C Read More »

Program to calculate age

In this article, you will learn to write a program to calculate age. That means, if the given two dates are dt1 and dt2, you need to calculate the difference between the two dates in years, months, and days. But make sure that the dt1 is earlier than the dt2. For example, Input : Birth date =

Program to calculate age Read More »

Calendar in C: C Mini Project

The mini-project “Calendar in C” is a console application using the C programming language. This project compiles in Code Blocks with the GCC compiler. In this console application, you can check the date for the given month and year. In this project, we are using Zeller’s Congruence. Zeller’s congruence is an algorithm devised by Christian

Calendar in C: C Mini Project Read More »