UrbanPro

Learn C Language from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

How do you list a file's date and time?

Asked by Last Modified  

Follow 0
Answer

Please enter your answer

Computer Guru

The C date and time operations are defined in the time.h header file time_t current_time; char* c_time_string; /* Obtain current time. */ current_time = time(NULL);
Comments

Computer Wizard

use time.h header file in your code
Comments

By including time.h header file.
Comments

14 Year Experienced in Teaching Maths, Physics and Chemistry.

use stat() function, that will show you file's attributes..
Comments

ls -t option flag sorts files/directories list by time/date.
Comments

Computer Wizard

int main(void) { struct tm str_time; time_t time_of_day; str_time.tm_year = 2012-1900; str_time.tm_mon = 6; str_time.tm_mday = 5; str_time.tm_hour = 10; str_time.tm_min = 3; str_time.tm_sec = 5; str_time.tm_isdst = 0; time_of_day = mktime(&str_time); printf(ctime(&time_of_day)); return...
read more
int main(void) { struct tm str_time; time_t time_of_day; str_time.tm_year = 2012-1900; str_time.tm_mon = 6; str_time.tm_mday = 5; str_time.tm_hour = 10; str_time.tm_min = 3; str_time.tm_sec = 5; str_time.tm_isdst = 0; time_of_day = mktime(&str_time); printf(ctime(&time_of_day)); return 0; } Output of the program: Thu Jul 05 11:03:05 2012 read less
Comments

View 4 more Answers

Related Questions

What is the benefit of using an enum rather than a #define constant?
The use of an enumeration constant (enum) has many advantages over using the traditional symbolic constant style of #define. These advantages include a lower maintenance requirement, improved program readability,...
Basundhara
0 0
7
Do array subscripts always start with zero?
Yes, it is a always starts with Zero index to Arraysize-1. If arrasize is 100 then index or subscript of array will be 0 to 99. Mostly all languages follow the same rule like C, C++, Java, C#, etc.
Avishkar
hi sir c progarm codeing how to write sir........
take any C book then u can learn more...
Suryateja
What is the output of the below: int x, y; printf("%d", scanf("%d %d", &x, &Y));
:) Good one. It checks my eye sight. This piece of code would result in an error: "undefined symbol Y". Note: 'scanf( )' not only scans and loads the values entered by users into variables, but it...
Pravalika
Is it good practicing c++ in code blocks instead of turbo c++?
Practicing/working on Turbo C++ is always good..because its hard to do comparatively 'code blocks'. seems 'code blocks' has been designed by considering the latest working tools(like Visual Studio from...
Santosh

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

C Program-Temperature [conversion from farenheit to degree celsius]
//WAP to convert temperture from farenheit into degree celsius //Header files#include<stdio.h>#include<conio.h> //Main functrion void main(){ //Variable declaration of type float float...

Introduction to Programming Languages
What is a Programming Language? A programming language is a formal computer language or constructed language designed to communicate instructions to a machine, particularly a computer. Programming languages...

Compiler vs Interpreter
Compiler Interpreter Convert all the code into binary format and execute. Convert one statement at a time and execute, then Convert next statement and execute. After conversion, source...

INTRODUCTION TO PROGRAMMING LANGUAGES
Language is a medium for communication. If we want to perform anything with another person, we can know the human language as a human being. Similarly, if we want to perform anything with a computer, we...

Basic Concepts of Web Designing
An introduction to domain names, web servers, and website hosting 1)What is the web? In a nutshell, the web is a whole bunch of interconnected computers talking to one another. The computers (on the...

Recommended Articles

Lasya Infotech is a Hyderabad based IT training institute founded in 2016 by O Venkat. Believing in his innovation, passion and persistence and with a diverse blend of experience, he started his brainchild to deliver exemplary professional courses to aspiring candidates by honing their skills. Ever since the institute envisions...

Read full article >

Brilliant Academy is one of the reputed institutes for B.Tech tuition classes. This institute is specialised in delivering quality tuition classes for B.E, Engineering - all streams and Engineering diploma courses. Incorporated in 2012, Brillant Academy is a brainchild of Mr Jagadeesh. The main motto of the academy is to...

Read full article >

Almost all of us, inside the pocket, bag or on the table have a mobile phone, out of which 90% of us have a smartphone. The technology is advancing rapidly. When it comes to mobile phones, people today want much more than just making phone calls and playing games on the go. People now want instant access to all their business...

Read full article >

Whether it was the Internet Era of 90s or the Big Data Era of today, Information Technology (IT) has given birth to several lucrative career options for many. Though there will not be a “significant" increase in demand for IT professionals in 2014 as compared to 2013, a “steady” demand for IT professionals is rest assured...

Read full article >

Looking for C Language Classes?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for C Language Classes?

The best tutors for C Language Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn C Language with the Best Tutors

The best Tutors for C Language Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more