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

find the sum of two matrices and WAP for it.

0 Answers   Huawei,


Write a program that accepts a string where multiple spaces are given in between the words. Print the string ignoring the multiple spaces. Example: Input: “ We Are Student “ Output: "We Are Student"

1 Answers  


write a program for fibonaci series by using while loop in c?

2 Answers  


Why c is known as a mother language?

0 Answers  


study the code: #include<stdio.h> void main() { const int a=100; int *p; p=&a; (*p)++; printf("a=%dn(*p)=%dn",a,*p); } What is printed? A)100,101 B)100,100 C)101,101 D)None of the above

15 Answers   Accenture, TCS,


What is a double c?

0 Answers  


The number of measuring units from an arbitarary starting point in a record,area,or control block to some other point a) recording pointer b) offset c) branching d) none

0 Answers  


What is RAM memory? and What is ROM?Who designed one is temparary and another is permanent?why they designed like that?By using far pointer which type data(whether hexadecimal)we can access?

1 Answers   Excel,


where does malloc() function get the memory?

1 Answers  


How would you use the functions fseek(), freed(), fwrite() and ftell()?

0 Answers   Aspire, Infogain, TISL,


Explain what is wrong with this program statement? Void = 10;

0 Answers  


how can i get output the following... 5 4 3 2 1 4 3 2 1 3 2 1 2 1 1 and 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 plz plz...

3 Answers  


Categories