Welcome To Tutorialspoint.dev
Officially launched 18th May 2019
C C++ CPP-Library

strftime() function in C/C++

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...
Arrays Amazon Amazon

Find the maximum repeating number in O(n) time and O(1) extra space

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...
C C Programs C-Functions

time() function in C

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...
C C++ c-puzzle

Change/add only one character and print ‘*’ exactly 20 times

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--) ...
C C++ cpp-puzzle

How to measure time taken by a function in C?

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 ...
C++ CPP-Functions CPP-Library

difftime() function in C++

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...
C++ CPP-Functions CPP-Library

asctime() function in C++

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 ...
C++ CPP-Functions CPP-Library

localtime() function in C++

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...
C Programs

ctime() Function in C/C++

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...

RTTI (Run-time type Information) in C++

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 ...

Subscribe to Our Newsletter