C Ejercicio Ejemplo 91
Título: Funciones de tiempo Ejemplo 1
Análisis del programa: Ninguno.
Código fuente:
// Created by www.w3big.com on 15/11/9. // Copyright © 2015年 本教程. All rights reserved. // #include <stdio.h> #include <time.h> int main () { time_t rawtime; struct tm * timeinfo; time ( &rawtime ); timeinfo = localtime ( &rawtime ); printf ( "当前本地时间为: %s", asctime (timeinfo) ); return 0; }
Ejecutar la salida anterior ejemplo es:
当前本地时间为: Tue Nov 10 16:28:49 2015