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 |
How variables are declared in c?
What are the phases in s/w developed life cycle? wat is the diff b/w stack & queue...where do we use stack
Explain how does free() know explain how much memory to release?
What does emoji p mean?
1.what are local and global variables? 2.what is the scope of static variables? 3.what is the difference between static and global variables? 4.what are volatile variables? 5.what is the use of 'auto' keyword? 6.how do we make a global variable accessible across files? Explain the extern keyword? 7.what is a function prototype? 8.what does keyword 'extern' mean in a function declaration?
IS it possible to define a zero sized array in c.if it is possible how can the elements of that array can be accessed.array index starts from zero,if it is possible to define zero sized array how can be its first element can be accesseed.
Which one to choose from 'initialization lists' or 'assignment', for the use in the constructor?
how to find anagram without using string functions using only loops in c programming
Explain what is a stream?
Reverse the part of the number which is present from position i to j. Print the new number.[without using the array] eg: num=789876 i=2 j=5 778986
what is the other ways to find a logic to print whether a number is an even or odd wit out using % symbol??????? i know three different ways to print it. so i need any other different logic>>>>>
Why c is called procedure oriented language?