time now c

#include <stdio.h>
#include <time.h>

int main() {
    // Declare a variable to store the current time
    time_t currentTime;

    // Get the current time using the time function
    time(&currentTime);

    // Convert the current time to a string representation
    char *timeString = ctime(&currentTime);

    // Print the current time
    printf("Current Time: %s", timeString);

    return 0;
}