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 exactly is \r in the C language?
In the C language, "\r" represents the carriage return character. When encountered in a string, it instructs the output device to return the cursor to the beginning of the current line. This character...
Sajini
0 0
5
Give the structure of 'C' programming. Also, give significance of math.h and string.h header files.
Hi, C structure is procedural programming. math.h and string .h will have a declerations of predefined methods. math.h ex: sqrt(),...etc. string.h ex: strlen(),strcpy,...etc. if you wanna brif let meknow. Thanks.
Ishwari

Program to accept a list of elements and find the maximum number in the list. 

 

The logic will be 1. Create an array of the desired type 2. Sort the array in the descending order 3. Fetch the first elemnet from the array, this will be the maximum element in that array. Now use...
Lavanya
0 0
8
How do I send a C program via email?
By using Google drive
Furqankhan
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

C Program-String Palindrome
//Header files #include<stdio.h>#include<conio.h>#include<string.h> //Main function void main(){ char mystring; int i,length; int flag=0; //Function for clearing screen clrscr();...

C Program-Error Handling[Program Exit Status]
//Header files #include<stdio.h>#include<conio.h>#include<stdlib.h> //Main Function void main(){ int dividend=20; int divisor=5; int quotient; //Function for clearing screen clrscr();...

C++ Program-Working with constant using #define preprocessor
//Header Files #include#include // using #define preprocessor for defining a constant#define len 10#define br 5#define rad 3#define NEWLINE '\n' //Main function void main(){ int area_r; float area_c; //Function...

Lets know about far, near and huge pointers for fresher interview purpose
All of these three candidates relate to 16 bit architecture where segmented memory architecture was there. They are not at all relevant for present days 32 or 64 bit architecture where the way of memory...

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

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