#define a 10

int main()
{
printf("%d..",a);
foo();
printf("%d..",a);
return 0;
}
void foo()
{
#undef a
#define a 50
}

Answers were Sorted based on User's Feedback



#define a 10 int main() { printf("%d..",a); foo(); printf("%d..&quo..

Answer / ilakkiyakandasamy

10..10..

Is This Answer Correct ?    2 Yes 0 No

#define a 10 int main() { printf("%d..",a); foo(); printf("%d..&quo..

Answer / ilakkiyakandasamy

10..10..

Is This Answer Correct ?    0 Yes 0 No

#define a 10 int main() { printf("%d..",a); foo(); printf("%d..&quo..

Answer / mansi

10..10

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Code Interview Questions

abcdedcba abc cba ab ba a a

2 Answers  


union u { struct st { int i : 4; int j : 4; int k : 4; int l; }st; int i; }u; main() { u.i = 100; printf("%d, %d, %d",u.i, u.st.i, u.st.l); } a. 4, 4, 0 b. 0, 0, 0 c. 100, 4, 0 d. 40, 4, 0

1 Answers   HCL,


What is the hidden bug with the following statement? assert(val++ != 0);

1 Answers  


writte a c-programm to display smill paces

2 Answers  


could you please send the program code for multiplying sparse matrix in c????

0 Answers  






main() { char *p = "hello world"; p[0] = 'H'; printf("%s", p); } a. Runtime error. b. “Hello world” c. Compile error d. “hello world”

5 Answers   HCL,


print a semicolon using Cprogram without using a semicolon any where in the C code in ur program!!

35 Answers   Tata Elxsi, TCS, VI eTrans,


void main() { char ch; for(ch=0;ch<=127;ch++) printf(“%c %d \n“, ch, ch); }

1 Answers  


how to return a multiple value from a function?

2 Answers   Wipro,


main( ) { char *q; int j; for (j=0; j<3; j++) scanf(“%s” ,(q+j)); for (j=0; j<3; j++) printf(“%c” ,*(q+j)); for (j=0; j<3; j++) printf(“%s” ,(q+j)); }

1 Answers  


main() { char a[4]="HELLO"; printf("%s",a); }

3 Answers   CSC,


How to access command-line arguments?

4 Answers  


Categories