UrbanPro

Learn C Language from the Best Tutors

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

Search in

What are the standard predefined macros?

Asked by Last Modified  

Follow 0
Answer

Please enter your answer

Predefined Macros Visual Studio 2015 Other Versions Lists the predefined preprocessor macros for standards support, and Microsoft-specific predefined preprocessor macros. The compiler recognizes the required predefined preprocessor macros specified by the ANSI/ISO C99 standard and the ISO C++17...
read more
Predefined Macros Visual Studio 2015 Other Versions Lists the predefined preprocessor macros for standards support, and Microsoft-specific predefined preprocessor macros. The compiler recognizes the required predefined preprocessor macros specified by the ANSI/ISO C99 standard and the ISO C++17 standard. The Microsoft C++ implementation provides several more. These preprocessor macros take no arguments and cannot be redefined. Some of the predefined macros are defined with values that are specific to the build environment or the specified compiler options. Standard predefined identifier The compiler supports this predefined identifier specified by ISO C99 and ISO C++11. __func__ The unqualified and unadorned name of the enclosing function as a function-local static const array of char. void example(){ printf("%s\n", __func__); } // prints “example” Standard predefined macros The compiler supports these predefined macros specified by the ISO C99 and ISO C++17 standards. __cplusplus An integer literal value when compiling a translation unit as C++. Otherwise undefined. __DATE__ The compilation date of the current source file. The date is a string literal of the form Mmm dd yyyy. The month name Mmm is the same as the month name for dates generated by the library function asctime declared in (time.h) headerfile. The first character of dd is a space if the value is less than 10. __FILE__ The name of the current source file. __FILE__ expands to a character string literal. To ensure that the full path to the file is displayed, use -FC (Full Path of Source Code File in Diagnostics). __LINE__ The line number in the current source file. The line number is an integer constant. It can be changed by using a #line directive. __STDC__ Defined as the integer literal constant 1 only when compiling a translation unit as C and if the /Za compiler option is given. Otherwise, undefined. __STDC_HOSTED__ The integer constant 1 if the implementation is a hosted implementation, one that supports the entire required standard library. Otherwise, the integer constant 0. __STDCPP_THREADS__ Defined as the integer constant 1 if and only if a program can have more than one thread of execution. Otherwise undefined. __TIME__ The time of translation of the preprocessing translation unit. The time is a character string literal of the form hh:mm:ss, the same as the time generated by the library function asctime. read less
Comments

Computer teacher

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

Related Questions

What is the most efficient way to store flag values?
A flag is a value used to make a decision between two or more options in the execution of a program. Efficiency in this case is a tradeoff between size and speed. The most memory-space efficient way to...
Deepak
0 0
6
How do I print \n in C or C++ programming?
void main () { printf(" "); getch(); }
Supriyo
0 0
6
What is the best IDE for C and C++ development?
If you're a student then Turbo C++ is best for C and C++ program + inbuilt C/C++ Graphics Function If you're a professional or working then Netbeans for C/C++ or Code:: Blocks is Best.
Balakrishnasingh
Why do we still use C language?
What is the C Language? The C language is a high-level, general-purpose programming language. It provides a straightforward, consistent, powerful interface for programming systems. That's why the C language...
Aditi
0 0
5
What is meant by high-order and low-order bytes?
Lower order and higher-order bytes are the terms used while computing calculations in a programming language. Usually, numbers are written from left to right. The left is the most significant bit, and...
Vishal
0 0
9

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

Ask a Question

Related Lessons

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

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

Everything about printf in C language
What is printf and from where it comes from in C code.? You must have used printf so many times in your Car programs but do you really know everything about printf? Let's see. What is the full form...

Program to swap the value of two variables without using third variable(simplest way)...
int main() { int a=10,b=20; printf("values of a before swap ="%d,a); printf("values of b before swap ="%d,b); a=a+b; b=a-b; a=a-b; printf("******************"); printf("values of a after swap...

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

Recommended Articles

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 >

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 >

Applications engineering is a hot trend in the current IT market.  An applications engineer is responsible for designing and application of technology products relating to various aspects of computing. To accomplish this, he/she has to work collaboratively with the company’s manufacturing, marketing, sales, and customer...

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