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 are the applications of C programming?
Hi Poulami Hope you are doing good. C programming language is a versatile and widely used language that has found applications in various domains. Some of the key applications of C programming include: 1....
Poulomi
0 0
6
How do I start learning C programming and finish it in one month?
Please follow the book "C Programming" by Detal & Detal. Its an applied book easy to understand compare to others. U may also learn through online free tutorial.
Pallavi
0 0
8
How do I get C help in Ubuntu?
Use command line tool 'man'. for example 'man printf' will give you details regarding printf function C
Ashmita
0 0
5
Why is C still so popular?
C remains popular for several reasons, and its enduring popularity can be attributed to a combination of historical significance, efficiency, and versatility. Here are some key reasons why C is still widely...
A
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

Some interview questions and answers for fresher level on Pointers
What is a void pointer? Void pointer is a special type of pointer which can reference or point to any data type. This is why it is also called as Generic Pointer. As a void pointer can point to...

Programming Practice Technique
Any Programming Language required an Algorithm. Algorithm - It is the finite set of instructions in which each and every instruction has the meaning, instructions are not ambiguous and all the instructions...

C Program-The Odd Loop Demo
/* WAP to print square value of the number entered by user using odd loop*/ //Header Files #include<stdio.h>#include<conio.h> //Main Function void main(){ char another='y'; int num,sq; //...

Features Of C Language
Features of C language It is a robust language with rich set of built-in functions and operators that can be used to write any complex program. The C compiler combines the capabilities of an assembly...

Storage classes in c
Storage classes determine the scope and life time of a variable. Scope is defined as the region over which the defined variable is accessible. Lifetime is the time during which the value of a variable...

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