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

What is meant by type casting?

616


Is c language still used?

528


Can one function call another?

619


What does volatile do?

554


illustrate the use of address operator and dereferencing operator with the help of a program guys plzzz help for this question

1572






Can we use visual studio for c?

537


How do you convert strings to numbers in C?

699


What is the concatenation operator?

598


What does a derived class inherit from a base class a) Only the Public members of the base class b) Only the Protected members of the base class c) Both the Public and the Protected members of the base class d) .c file

651


What are different types of operators?

585


any "C" function by default returns an a) int value b) float value c) char value d) a & b

656


What are structural members?

560


How can I sort more data than will fit in memory?

619


What is the difference between struct and union in C?

556


What is use of #include in c?

586