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 list in c?
How old is c programming language?
Are bit fields portable?
Why is it important to memset a variable, immediately after allocating memory to it ?
Explain what is the difference between far and near ?
Differentiate between ordinary variable and pointer in c.
What is c mainly used for?
what are # pragma staments?
What is the basic structure of c?
What is meant by type specifiers?
There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?
What is a protocol in c?
Explain what is the benefit of using an enum rather than a #define constant?
why arguments can generally be passed to functions a) sending the values of the arguments b) sending the addresses of the arguments c) a & b d) none of the above
How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?