Skip to content

Tag Archives: C-Macro & Preprocessor

In this article, we will discuss the difference between #define and #undef pre-processor in C language. Pre-Processor: Pre-processor is a program that performs before the… Read More
Pragma Directives: The pragma directive is used to control the actions of the compiler in a particular portion of a program without affecting the program… Read More
#include is a way of including a standard or user-defined file in the program and is mostly written at the beginning of any C/C++ program.… Read More
This directive is a special purpose directive and is used to turn on or off some features. This type of directives are compiler-specific i.e., they… Read More
Print a string without using quotes anywhere in the program using C or C++. Note : should not read input from the console. Recommended: Please… Read More
C/C++ Preprocessor directives basics Preprocessor directives: In almost every program we come across in C/C++, we see a few lines at the top of the… Read More
Compiling a C program – Behind the Scene A Preprocessor is a system software (a computer program that is designed to run on computer’s hardware… Read More
As the name suggests Preprocessors are programs that process our source code before compilation. There are a number of steps involved between writing a program… Read More
typedef: The typedef is used to give data type a new name. For example, // C program to demonstrate typedef #include <stdio.h>    // After… Read More
What is the output for the following code snippet? #include<stdio.h> #define A -B #define B -C #define C 5    int main() {   printf("The value… Read More
These are two important header files used in C programming. While “<stdio.h>” is header file for Standard Input Output, “<stdlib.h>” is header file for Standard… Read More
How to print and store a variable name in string variable? We strongly recommend you to minimize your browser and try this yourself first In… Read More
Give a = 12 and b = 36 write a C function/macro that returns 3612 without using arithmetic, strings and predefined functions. We strongly recommend… Read More
#define is a preprocessor directive. Things defined by #define are replaced by the preprocessor before compilation begins.  const variables are actual variables like other normal… Read More
#include <stdio.h> #define get(s) #s    int main() {     char str[] = get(GeeksQuiz);     printf("%s", str);     return 0; } (A) Compiler Error (B) #GeeksQuiz (C) GeeksQuiz… Read More