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



A.C func() { pritnf(" in fuction %d",MACRO); } MAIN.c testfunc() { #defi..

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

A.C func() { pritnf(" in fuction %d",MACRO); } MAIN.c testfunc() { #defi..

Answer / venu

MAIN.c

#define MACRO 10

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More C Interview Questions

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.

0 Answers  


A character flag or control mechanism that delineates one data item from another a) variable b) constant c) delimiter d) call by reference

0 Answers  


What is a MAC Address?

0 Answers  


What are the types of assignment statements?

0 Answers  


define function

4 Answers   Assurgent, Sonata,






Difference between Function to pointer and pointer to function

0 Answers  


who is the father of C Language?

20 Answers   CTS, UST,


What does %d do?

0 Answers  


main() { int i = 10; printf(" %d %d %d \n", ++i, i++, ++i); }

10 Answers   TCS, Vector,


Find MAXIMUM of three distinct integers using a single C statement

0 Answers  


Are pointers integer?

0 Answers  


What are shell structures used for?

0 Answers  


Categories