Curioustab
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Home
»
C Programming
»
C Preprocessor
Macros have a local scope.
True
Correct Answer:
False
Explanation:
False, The scope of macros is globals and functions. Also the scope of macros is only from the point of definition to the end of the file.
← Previous Question
Next Question→
More Questions from
C Preprocessor
There exists a way to prevent the same file from getting #included twice in the same program.
Will the following program print the message infinite number of times? #include
#define INFINITELOOP while(1) int main() { INFINITELOOP printf("CuriousTab"); return 0; }
Will the program compile successfully? #include
int main() { #ifdef NOTE int a; a=10; #else int a; a=20; #endif printf("%d\n", a); return 0; }
Would the following typedef work? typedef #include l;
Will the program compile successfully? #include
#define X (4+Y) #define Y (X+3) int main() { printf("%d\n", 4*X+2); return 0; }
It is necessary that a header files should have a .h extension?
Will the program compile successfully? #include
int main() { printf("India" "CURIOUSTAB\n"); return 0; }
Will it result in to an error if a header file is included twice?
Discussion & Comments
No comments yet. Be the first to comment!
Name:
Comment:
Post Comment
Join Discussion
Discussion & Comments