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();
}
Answers were Sorted based on User's Feedback
Answer / 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 |
Write a program in "C" to calculate the root of a quadratic equation ax^2+bx+c=0, where the value of a,b & c are known.
A character flag or control mechanism that delineates one data item from another a) variable b) constant c) delimiter d) call by reference
What is a MAC Address?
What are the types of assignment statements?
define function
Difference between Function to pointer and pointer to function
who is the father of C Language?
20 Answers CTS, UST,
What does %d do?
main() { int i = 10; printf(" %d %d %d \n", ++i, i++, ++i); }
Find MAXIMUM of three distinct integers using a single C statement
Are pointers integer?
What are shell structures used for?