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 do I become good in competitive programming in a year if I have just started learning C language?
The best topics to learn would be Data structures and also the analysis of algorithms..(THESE ARE BASICS BUT IF U LEARN THEM PROPERLY!!! CODING WOULD BE A PIECE OF CAKE FOR U....)
Anmol
0 0
9
What is the meaning of \n and \t in C language?
is used for new line and \t is used to give 3-space (1 tab space) in between the words
Soumya
0 0
5
any one can teach me c++
Yes of course i can give you online classes
Bhuvanesh
What is C language?
C is a general-purpose, procedural programming language that was developed in the early 1970s by Dennis Ritchie at Bell Labs. It is a low-level language, which means it provides a relatively simple and...
Vikram
0 0
7
How do I learn C++ from the basics?
First you learn C LANGUAGE
Priyanka
0 0
6

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

Ask a Question

Related Lessons

Why C is a Language and not a database?
When I interviewed a candidate, I raised this question many times, but I have not got the answer correctly. To under why C is a language and not a database, it is good to understand why our communication...

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...
S

Memory Layout of C Programs
A typical memory representation of C program consists of following sections. Text Segment: A text segment, also known as a code segment or simply as text, is one of the sections of a program in an object...

Facts about C language
C programming language was developed in 1972 by Dennis Ritchie at AT&T Bell Labs. It was developed to overcome the problems of languages such as B, BPCL. It was developed to write the Unix operating...

C for Begginers
C is an procedure oriented programming language. For any begginer the word program is new. Program: Set of instructions to be followed by machine or computer. Instruction Examples: Arithmetic instruction...

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 >

Hadoop is a framework which has been developed for organizing and analysing big chunks of data for a business. Suppose you have a file larger than your system’s storage capacity and you can’t store it. Hadoop helps in storing bigger files than what could be stored on one particular server. You can therefore store very,...

Read full article >

Information technology consultancy or Information technology consulting is a specialized field in which one can set their focus on providing advisory services to business firms on finding ways to use innovations in information technology to further their business and meet the objectives of the business. Not only does...

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