strftime() is a function in C which is used to format date and time. It comes under the header file time.h, which also contains a structure named struct tm which is u...
Share
Given an array of size n, the array contains numbers in range from 0 to k-1 where k is a positive integer and k <= n. Find the maximum repeating number in this arr...
Share
The time() function is defined in time.h (ctime in C++) header file. This function returns the time since 00:00:00 UTC, January 1, 1970 (Unix timestamp) in seconds. I...
Share
In the below code, change/add only one character and print ‘*’ exactly 20 times.
int main()
{
int i, n = 20;
for (i = 0; i < n; i--)
...
Share
To calculate time taken by a process, we can use clock() function which is available time.h. We can call the clock function at the beginning and end of the code for ...
Share
The difftime() function is defined in ctime header file. The difftime() function is used to calculate the difference between two times in second.
Syntax:
double difft...
Share
The asctime() function is defined in the ctime header file. The asctime() function converts the given calendar time of structure tm to a character representation i.e ...
Share
The localtime() function is defined in the ctime header file. The localtime() function converts the given time since epoch to calendar time which is expressed as loca...
Share
The ctime() function is define in the time.h header file. The ctime() function returns the string representing the localtime based on the argument timer.
Syntax:
char...
Share
In C++, RTTI (Run-time type information) is a mechanism that exposes information about an object’s data type at runtime and is available only for the classes ...
Share