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 many key words availabel in c a) 28 b) 31 c) 32
What is structure in c explain with example?
what will be the output: main(){char ch;int a=10;printf("%d",ch);}
36 Answers Accenture, TCS, Wipro,
main() { int i=1; while (i<=5) { printf("%d",i); if (i>2) goto here; i++; } } fun() { here: printf("PP"); }
write a program to swap two numbers without using temporary variable?
What is %g in c?
write a program to find the largest and second largest integer from an array
what will be the out put. #include<stdio.h> void main() { printf("Output:"); printf(1+"vikashpatel"); }//output: ikashpatel
simple program for virtual function?
What are qualifiers?
Write a function stroverlap that takes (at least) two strings, and concatenates them, but does not duplicate any overlap. You only need to worry about overlaps between the end of the first string and the beginning of the second string. Examples: batman, manonthemoon = batmanonthemoon batmmamaman, mamamanonthemoon = batmmamamanonthemoon bat, man = batman batman, batman = batman batman, menonthemoon = batmanmenonthemoon
what are the compilation steps? ( i want inside the compiler )