All posts by Pankaj

About Pankaj

Pankaj Prakash is the founder, editor and blogger at Codeforwin. He loves to learn new techs and write programming articles especially for beginners. He works at Vasudhaika Software Sols as a Software Design Engineer and manages Codeforwin. In short Pankaj is Web developer, Blogger, Learner, Tech and Music lover.

How to write multiline macro in C language?

Quick links

How to write multiline macro in C programming language. We generally define macros that spans over single line. However there exists situations when you want to define a macro that spans over multiple line.

In this post I will explain how to write a multiline macro in C language. So let us get started.

Continue reading How to write multiline macro in C language?

C program to find square and cube of a number using macro – #define SQUARE(x), #define CUBE(x)

Write a C program to find square and cube of a number using macro. How to find cube of a number using macro #define preprocessor directive in C program. Logic to find square and cube of a number using macro.

Continue reading C program to find square and cube of a number using macro – #define SQUARE(x), #define CUBE(x)

C program to define, undefine and redefine a macro – #define, #undef

Write a C program to define, undefine and redefine a macro (compile time constant). How to define, remove and redefine a macro in C programming. How to define, remove and redefine a compile time constant (macro) in C programming.

Continue reading C program to define, undefine and redefine a macro – #define, #undef

C program to create and include custom header file

Write a C program to create and include your custom header file. How to create and include your own header file in C programming. C program to include another C program and custom header files.

Continue reading C program to create and include custom header file

Stringize (#) and token pasting (##) operator in C language

C programming supports two special preprocessor directive for string operations. Stringize (#) and token pasting (##) are C preprocessor string manipulation operators.

In previous article we learned about basic and conditional preprocessor directives in C language. In this article we will move further and learn string manipulation preprocessor operators.

Continue reading Stringize (#) and token pasting (##) operator in C language