1.

Which of the following library functions returns the time in UTC (Greenwich mean time) format?(a) localtime()(b) gettime()(c) gmtime()(d) settime()I have been asked this question during an online interview.My question comes from Date and Time Functions topic in division C Library of C

Answer»

Right option is (c) gmtime()

EXPLANATION: The library FUNCTION gmtime() returns the time in UTC format. To FIND the current time, we USE the function LOCALTIME().



Discussion

No Comment Found

Related InterviewSolutions