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
What is a good way to implement complex numbers in c?
What does the characters “r” and “w” mean when writing programs that will make use of files?
What are the properties of union in c?
How can I pad a string to a known length?
Why can’t constant values be used to define an array’s initial size?
What are external variables in c?
When should a far pointer be used?
Place the #include statement must be written in the program?
Are local variables initialized to zero by default in c?
Is it acceptable to declare/define a variable in a c header?
What are keywords in c with examples?
Explain how can I convert a number to a string?
What are the rules for the identifier?
What is getch() function?
What are bitwise shift operators in c programming?