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
Why static variable is used in c?
Does c have class?
How can you find the day of the week given the date?
How many bytes are occupied by near, far and huge pointers (dos)?
What is new line escape sequence?
What is #line used for?
write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.
Write a program to print ASCII code for a given digit.
Is there any algorithm to search a string in link list in the minimum time?(please do not suggest the usual method of traversing the link list)
Can you mix old-style and new-style function syntax?
What is calloc() function?
What is hashing in c language?
What is difference between && and & in c?
How can I read/write structures from/to data files?
How to declare pointer variables?