A.C
func()
{
pritnf(" in fuction %d",MACRO);
}
MAIN.c
testfunc()
{
#define MACRO 10
printf("in test function %d", MACRO);
}
main()
{
printf("in main %d",MACRO);
func();
testfunc();
getch();
}
Answer Posted / modassir
The error is for the line where we try to call func()
where we try to print macro through printf, as because
macro is not define there.
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
Is it acceptable to declare/define a variable in a c header?
I have a varargs function which accepts a float parameter?
what is the basis for selection of arrays or pointers as data structure in a program
What are types of preprocessor in c?
What is the difference between exit() and _exit() function?
write a program using linked list in which each node consists of following information. Name[30] Branch Rollno Telephone no i) Write the program to add information of students in linked list
How to declare pointer variables?
Is using exit() the same as using return?
Why is #define used?
can any one tel me wt is the question pattern for NIC exam
How do you convert strings to numbers in C?
What is the difference between void main and main in c?
a c code by using memory allocation for add ,multiply of sprase matrixes
what is different between auto and local static? why should we use local static?
Is file a keyword in c?