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 processes our source code before compilation. There are a number of steps involved between writing a program… Read More »
typedef : typedef is used to give data type a new name, for example Output : c #define : is a C directive which is… Read More »
What is the output for the following code snippet? This question is contributed by Aastha Anand. (A) The value of A is 4 (B) The… 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?
Give a = 12 and b = 36 write a C function/macro that returns 3612 without using arithmetic, strings and predefined functions.
#define is a preprocessor directive. Things defined by #define are replaced by the preprocessor before compilation begins.
(A) Compiler Error (B) #GeeksQuiz (C) GeeksQuiz (D) GGeeksQuiz Answer: (C) Explanation: The preprocessing operator ‘#’ is used to convert a string argument into a… Read More »
Output of following C program? (A) maximum is 100 (B) abcimum is 100 (C) 100imum is 100 (D) abcimum is abc Answer: (A) Explanation: Quiz… Read More »
Predict the output of following program? (A) 1000 (B) 100 (C) Compiler Error (D) Garbage Value Answer: (C) Explanation: After preprocessing stage of compilation, the… Read More »
What is the use of “#pragma once”? (A) Used in a header file to avoid its inclusion more than once. (B) Used to avoid multiple… Read More »
Which file is generated after pre-processing of a C program? (A) .p (B) .i (C) .o (D) .m Answer: (B) Explanation: After the pre-processing of… Read More »
Output? (A) 100 (B) Compiler Error (C) 0 (D) 1 Answer: (A) Explanation: The operator ## is called “Token-Pasting” or “Merge” Operator. It merges two… Read More »