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


Please Help Members By Posting Answers For Below Questions

List the difference between a "copy constructor" and a "assignment operator"?

795


Write a code to remove duplicates in a string.

847


What is the purpose of main() function?

959


what is the difference between class and unio?

2129


What are operators in c?

801


What do you mean by keywords in c?

911


What does c mean before a date?

865


Can we declare variable anywhere in c?

749


Explain what is a const pointer?

868


What is the meaning of c in c language?

834


‘SAVEPOINT’ and ‘ROLLBACK’ is used in oracle database to secure the data comment. Give suitable examples of each with sql command.

2098


Tell us the use of fflush() function in c language?

912


How are Structure passing and returning implemented by the complier?

951


Write a program to use switch statement.

908


What are c identifiers?

869