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 are the properties of union in c?
What is the difference between test design and test case design?
How many header files are in c?
what is use of malloc and calloc?
Explain what is the use of a semicolon (;) at the end of every program statement?
write a c program to find the largest and 2nd largest numbers from the given n numbers without using arrays
What is the difference between abs() and fabs() functions?
When was c language developed?
What is the meaning of typedef struct in c?
How many main () function we can have in a project?
What are header files? What are their uses?
Why c is called top down?
What are the types of arrays in c?
stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return -1. The function should not make use of any C library function calls.
What is the difference between union and structure in c?