UrbanPro

Learn C Language from the Best Tutors

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

Search in

What are the __DATE__ and __TIME__ preprocessor commands?

Asked by Last Modified  

Follow 2
Answer

Please enter your answer

Professional Tutor with 15 years of experience.

The standard predefined macros are specified by the relevant language standards, so they are available with all compilers that implement those standards. Older compilers may not provide all of them. Their names all start with double underscores. __DATE__ This macro expands to a string constant that...
read more
The standard predefined macros are specified by the relevant language standards, so they are available with all compilers that implement those standards. Older compilers may not provide all of them. Their names all start with double underscores. __DATE__ This macro expands to a string constant that describes the date on which the preprocessor is being run. The string constant contains eleven characters and looks like "Feb 12 1996". __TIME__ This macro expands to a string constant that describes the time at which the preprocessor is being run. The string constant contains eight characters and looks like "23:59:01". read less
Comments

Thank You for your Questions.... _DATE_ macro expands to a string constant that describes the date on which the pre-processor is being run whereas _TIME_ macro expands to a string constant that describes the time at which the pre-processor is being run. Thanks, Team DishaaPro
Comments

Learn by doing it. No theory Only Practical

Preprocessor is first statement that get executed. It tells compiler to pre-process before compilation. _DATE --> The current date as a character literal in "MMM DD YYYY" format. and The current time as a character literal in "HH:MM:SS" format. you can use them as below : void main() { printf("Date...
read more
Preprocessor is first statement that get executed. It tells compiler to pre-process before compilation. _DATE --> The current date as a character literal in "MMM DD YYYY" format. and The current time as a character literal in "HH:MM:SS" format. you can use them as below : void main() { printf("Date :%s\n", __DATE__ ); printf("Time :%s\n", __TIME__ ); } read less
Comments

Experienced faculty in C with data structures and C++ with Data Structures,Linux Admin with Advance linux concepts

__DATE__ and __TIME are global identifiers __DATE__ returns string literal Date for when the processing begins on that file __TIME__ return string literal Time for when the processing begins on that file.
Comments

C and linux Expert

__DATE_ macro show current date as a character in "MMM DD YYYY" format. __TIME__ macro show current time as a character in "HH:MM:SS" format.
Comments

The __DATE__ macro is used to insert the current compilation date in the form "mm dd yyyy" into your program. Similarly, the __TIME__ macro is used to insert the current compilation time in the form "hh:mm:ss" into your program. This date-and-time-stamp feature should not be confused with the current...
read more
The __DATE__ macro is used to insert the current compilation date in the form "mm dd yyyy" into your program. Similarly, the __TIME__ macro is used to insert the current compilation time in the form "hh:mm:ss" into your program. This date-and-time-stamp feature should not be confused with the current system date and time. Rather, these two macros enable you to keep track of the date and time your program was last compiled. This feature can come in very handy when you are trying to track different versions of your program. For instance, many programmers like to put a function in their programs that gives compilation information as to when the current module was compiled. This task can be performed as shown here: #include stdio.h void main(void); void print_version_info(void); void main(void) { print_version_info(); } void print_version_info(void) { printf("Date Compiled: %s\n", __DATE__); printf("Time Compiled: %s\n", __TIME__); } read less
Comments

Professional Trainer:: Hadoop Big Data, DevOps, Perl, Python

__DATE__ A character string literal containing the date when the source file was compiled. The date will be in the form: "Mmm dd yyyy" where: Mmm represents the month in an abbreviated form (Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, or Dec). dd represents the day. If the day...
read more
__DATE__ A character string literal containing the date when the source file was compiled. The date will be in the form: "Mmm dd yyyy" where: Mmm represents the month in an abbreviated form (Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, or Dec). dd represents the day. If the day is less than 10, the first d will be a blank character. yyyy represents the year. __TIME__ Defined as a character string literal containing the time when the source file was compiled. The time will be in the form: "hh:mm:ss" where: hh represents the hour. mm represents the minutes. ss represents the seconds. read less
Comments

Computer & Maths Professor

__DATE__ prints the current date in "MMM DD YYYY" format. _TIME_ prints the current time in "HH:MM:SS" format.
Comments

The __DATE__ macro is used to insert the current compilation date in the form "mm dd yyyy" into your program. The __TIME__ macro is used to insert the current compilation time in the form "hh:mm:ss" into your program.
Comments

Mathematics and Computer science guide

_DATE__ The current date as a character literal in "MMM DD YYYY" format. __TIME__ The current time as a character literal in "HH:MM:SS" format. printf("File :%s\n", __FILE__ ); printf("Date :%s\n", __DATE__ );
Comments

View 24 more Answers

Related Questions

How can I learn C easily and rapidly?
You can learn C by three ways 1. Practise 10 programs daily for 10 days. 2. Understand the programming concept before going to make an attempt 3. Try to do some simple projects on your own will improve your skills rapidly.
Umamahesh
0 0
5
How to improve my c knowledge........
First learn the basic concepts of C .There is a book named Let Us C. It is a very good book with all the basics and concepts of C.I also have this book .I take classes of teaching basics of C,C++,java. Learn...
Anish
What purpose does \n have in C programming?
is used for new line. It prints the output in New or next line
Nasar
0 0
9
Why C language is still available in market, while so many & much easier languages are available ?
Now, I agree that you can use OOP in C to some extent, but it's sort of painful and inelegant (well at least compared to C++ I guess). So, what makes C so popular? Is it efficiency; being low-level; the...
Pankaj

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

Ask a Question

Related Lessons

How to write shared library program using C Programming?
Library Name : hellofilename : hello.c#include void Hello(){ printf("Hello World .. How are you 1\n");}======================================Header File:hello.h#ifndef __HELLO_H#define __HELLO_Hvoid Hello(void);#endif===============================Application...

Tress And Its Traversal
Depth First Traversals:(a) Inorder (Left, Root, Right) : 4 2 5 1 3(b) Preorder (Root, Left, Right) : 1 2 4 5 3(c) Postorder (Left, Right, Root) : 4 5 2 3 1 Trees are one of the data structures like...

Array vs Linked List
Array Linked List Accessing element is easy. Accessing element is difficult compare to Array. Easy to use. Difficult to use. Memory is Fixed size. Memory is variable size. If...

What is a Programming Language
What is a Language? Language is a communication system of human. What is a programming Language? A programming Language is a formal constructed language design to communicate...

What Would Be Life Cycle Of A Fresher After Campus In An IT Company?
1. Basic Technical Training: Since freshers are not subject matter experts so gone through 3 - 6 months basic technical training within Organization. 2. Technical Assessment: HR sends freshers to various...

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 >

Software Development has been one of the most popular career trends since years. The reason behind this is the fact that software are being used almost everywhere today.  In all of our lives, from the morning’s alarm clock to the coffee maker, car, mobile phone, computer, ATM and in almost everything we use in our daily...

Read full article >

Business Process outsourcing (BPO) services can be considered as a kind of outsourcing which involves subletting of specific functions associated with any business to a third party service provider. BPO is usually administered as a cost-saving procedure for functions which an organization needs but does not rely upon to...

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