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


Please Help Members By Posting Answers For Below Questions

Why static variable is used in c?

558


Does c have class?

614


How can you find the day of the week given the date?

618


How many bytes are occupied by near, far and huge pointers (dos)?

675


What is new line escape sequence?

811






What is #line used for?

583


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.

3503


Write a program to print ASCII code for a given digit.

689


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)

1866


Can you mix old-style and new-style function syntax?

664


What is calloc() function?

626


What is hashing in c language?

616


What is difference between && and & in c?

600


How can I read/write structures from/to data files?

553


How to declare pointer variables?

687