UrbanPro

Learn C Language from the Best Tutors

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

Search in

How do you override a defined macro?

Asked by Last Modified  

Follow 1
Answer

Please enter your answer

Professional Tutor with 15 years of experience.

We can use the #ifdef and #undef directive to undefine a previously defined macro.
Comments

C and linux Expert

You can use the #undef preprocessor directive to undefine (override) a previously defined macro. Many programmers like to ensure that their applications are using their own terms when defining symbols such as TRUE and FALSE.
Comments

Computer & Maths Professor

You can use the #undef preprocessor directive to undefine (override) a previously defined macro.
Comments

You can't. The command line is handled before any source and header files. If a source file defines a macro, then it must not be defined before, and will get the new value from now on. The only way to change it, is to #undef and #define it again, at a later point. If you have access to a header...
read more
You can't. The command line is handled before any source and header files. If a source file defines a macro, then it must not be defined before, and will get the new value from now on. The only way to change it, is to #undef and #define it again, at a later point. If you have access to a header that is included after the definition, then you have a chance. read less
Comments

website and mobile application development training, digital marketing training

Yes, You can use the #undef preprocessor directive to undefine (override) a previously defined macro
Comments

Tutor

You can use the #undef preprocessor directive to undefine (override) a previously defined macro.
Comments

Thanks for your question Sharmistha.... By using #undef pre-processor directive we can override a defined macro. Thanks, Team DishaaPro, www.dishaapro.com
Comments

#define MYMACRO(x) x*x //previously defined macro ... #ifdef MYMACRO #undef MYMACRO #define MYMACRO(x) x*x*x //new definition #endif int main() { printf("%d\n", MYMACRO(2)); return 0; }
Comments

Science Expert, C & C++ Strong

You can use the #undef preprocessor directive to undefine (override) a previously defined macro. Many programmers like to ensure that their applications are using their own terms when defining symbols such as TRUE and FALSE. Your program can check to see whether these symbols have been defined already,...
read more
You can use the #undef preprocessor directive to undefine (override) a previously defined macro. Many programmers like to ensure that their applications are using their own terms when defining symbols such as TRUE and FALSE. Your program can check to see whether these symbols have been defined already, and if they have, you can override them with your own definitions of TRUE and FALSE. read less
Comments

LearnHowToLearn, Expert In Programming Languages

Just redefine it.
Comments

View 10 more Answers

Related Questions

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 can I develop my C language?
Developing your proficiency in the C programming language involves a combination of learning, practice, and real-world application. Here are some steps to help you enhance your skills in C: Learn the...
Himanshu
0 0
5
In C/C++, when should you use the comma (,) operator instead of the semicolon (;) statement terminator?
int a=2; b=a; b=a+2; Instead of the above two statements we can write it as b=(a,a+2); The value of b is 4
Thimma
0 0
5
What purpose does \n have in C programming?
is used for new line. It prints the output in New or next line
Nasar
0 0
9
How is C++ language used nowadays?
C++ is a fast and strongly-typed programming language which makes it an ideal choice for developing operating systems. Mac OS X has large amounts written in C++. Most of the software from Microsoft like...
Arumugam
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

Pointers Concept
Every variable has a memory location and every memory location has its address defined which can be accessed using ampersand (&) operator, which denotes an address in memory. Consider the following...

Necessity of Theory and Practical in Computer Science.
Upon studying a subject both theory and practical are important. Usually many schools concentrate more on theory and the marks not on the practical. Other and opposite kind of people prefer practical...

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 Would Be Life Cycle Of A Fresher After Campus In An IT Company?
1. Basic Technical Training: Since freshers are not subject matter experts so gone through 3 - 6 months basic technical training within Organization. 2. Technical Assessment: HR sends freshers to various...

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 >

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 >

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 >

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