Skip to content
Courses
DSA to Development
Get IBM Certification
Newly Launched!
Master Django Framework
Become AWS Certified
For Working Professionals
Interview 101: DSA & System Design
Data Science Training Program
JAVA Backend Development (Live)
DevOps Engineering (LIVE)
Data Structures & Algorithms in Python
For Students
Placement Preparation Course
Data Science (Live)
Data Structure & Algorithm-Self Paced (C++/JAVA)
Master Competitive Programming (Live)
Full Stack Development with React & Node JS (Live)
Full Stack Development
Data Science Program
All Courses
Tutorials
Data Structures & Algorithms
ML & Data Science
Interview Corner
Programming Languages
Web Development
CS Subjects
DevOps And Linux
School Learning
Practice
Build your AI Agent
GfG 160
Problem of the Day
Practice Coding Problems
GfG SDE Sheet
Contests
Accenture Hackathon (Ending Soon!)
GfG Weekly [Rated Contest]
Job-A-Thon Hiring Challenge
All Contests and Events
DSA
Practice Problems
Python
C
C++
Java
Courses
Machine Learning
DevOps
Web Development
System Design
Aptitude
Projects
Sign In
▲
Similar Topics
C++
4k+ articles
C++ Programs
2.5k+ articles
C Language
1.8k+ articles
CPP-Functions
600+ articles
Program Output
170+ articles
C Basics
76 articles
C-Output
70 articles
C-Macro & Preprocessor
33 articles
Macro & Preprocessor
21 articles
Interesting-Facts
17 articles
cpp-macros
11 posts
Popular Articles
Recent Articles
When to Use Enum Instead of Macro in C++?
Last Updated: 18 March 2024
In C++, both enums and macros are used to define symbolic names for a set of values. However, there are certain situations where using an en
...read more
cpp-macros
C++
C++ Programs
Picked
CPP Examples
Header Guard in C++
Last Updated: 02 November 2020
Header Guards in C++ are conditional compilation directives that help to avoid errors that arise when the same function or variable is defin
...read more
CPP-Basics
cpp-macros
Programming Language
C++
C++ Programs
Macros and its types in C
Last Updated: 21 March 2025
In C programming, a macro is a symbolic name or constant that represents a value, expression, or code snippet. They are defined using the #d
...read more
C Macro
cpp-macros
C Language
C++
C Programs
Similar Topics
C++
4k+ articles
C++ Programs
2.5k+ articles
C Language
1.8k+ articles
CPP-Functions
600+ articles
Program Output
170+ articles
C Basics
76+ articles
C-Output
70+ articles
C-Macro & Preprocessor
33+ articles
Macro & Preprocessor
21+ articles
Interesting-Facts
17+ articles
errno constant in C++
Last Updated: 14 August 2021
errno is a preprocessor macro used for error indication.The value of errno is set to zero at program startup, and any function of the standa
...read more
CPP-Functions
cpp-macros
C++
Macro & Preprocessor
C Preprocessor Directives
Last Updated: 02 April 2025
In C programming, the preprocessor is a program that process the source code before the actual compilation begins. It uses preprocessor dire
...read more
C Basics
cpp-macros
C Language
C++
C-Macro & Preprocessor
Macro & Preprocessor
Macros vs Functions
Last Updated: 22 June 2022
A macro is a name given to a block of C statements as a pre-processor directive. Being a pre-processor, the block of code is communicated to
...read more
CPP-Functions
cpp-macros
C Language
C++
How to print a variable name in C?
Last Updated: 02 January 2025
Printing a variable name means printing the identifier that is assigned to the variable. To print it, it should be in the form of string. Th
...read more
c-puzzle
cpp-macros
C Language
C-Macro & Preprocessor
A C Programming Language Puzzle
Last Updated: 21 June 2018
Give a = 12 and b = 36 write a C function/macro that returns 3612 without using arithmetic, strings and predefined functions.We strongly re
...read more
cpp-macros
cpp-puzzle
C Language
C-Macro & Preprocessor
Difference between #define and const in C
Last Updated: 02 January 2025
In C, both #define and const define constant values, but these constants differ greatly in their behaviors and implementation. #define is a
...read more
cpp-macros
C Language
C-Macro & Preprocessor
Interesting Facts about Macros and Preprocessors in C
Last Updated: 10 January 2025
In a C program, all lines that start with # are processed by preprocessor which is a special program invoked by the compiler. by this we mea
...read more
C Basics
cpp-macros
C Language
Interesting-Facts
Output of the Program | Use Macros Carefully!
Last Updated: 21 June 2022
Predict the output of the below program [tabby title="C++"][sourcecode language="cpp"]#include iostreamusing namespace std;#define square(x)
...read more
Program Output
cpp-macros
C-Output
1
1
1
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !