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

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

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

Related Questions

I learned C. Shall I learn a new language or keep practicing C?
If you are confident about it then start a new language ,but keep practicing c
Nimesh
0 0
6
Why is C programming language called C?
It was first known as New B as it was an improved version of the B programming language. As C comes next to B in the English alphabet, it was renamed C later before its release. C is the only programming...
Shiva
0 0
5
How do I send a C program via email?
upload your file in gdrive then use that link you can easily email that program
Furqankhan
0 0
5
What is the benefit of using an enum rather than a #define constant?
#define is a symbolic constant. symbolic constants are uppercase letters. symbolic constants above the main() function. symbolic constants are not terminated with semicolon. symbolic constants must define using #define preprocessor directive.
Basundhara
0 0
7
Why do we still use C language?
C language is still widely used for several reasons. It offers low-level memory manipulation, high performance, and efficient hardware access, making it suitable for system-level programming, embedded...
Aditi
0 0
5

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

Ask a Question

Related Lessons

Creating First Program Using C Language
Step 1: Install and setup Turbo C compiler on your computer. Step 2: Open Turbo C from your Desktop or Programs menu. Select “File” from menu bar and select option “New”. Step...

C Program to print Block Letter and Small Case Alphabets using C
/* WAP to print Block Letter and Small Case Alpahbets using C*/ //Hint:use ascii code(value) to print #include#include void main(){ int i; clrscr(); //Block Letters Alphabets printf("Block Letters Alphabets\n");...
S

C Program-Upper Case Demo
/*WAP to print the character entered by user in upper case*/ //Header files #include<stdio.h>#include<conio.h> //Main function void main(){ char ch; //Function for clearing screen clrscr(); ...
S

Basics Of C And C++
C++ is powerful, highly flexible, and adaptable programming language that allows software engineers to organise and process information quickly and effectively. But this high-level language is relatively...

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

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