#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

main() { int i = 258; int *iPtr = &i; printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) ); }

1 Answers  


Link list in reverse order.

8 Answers   NetApp,


main() { extern out; printf("%d", out); } int out=100;

1 Answers  


write a c-program to find gcd using recursive functions

5 Answers   HTC, Infotech,


main() { int i; float *pf; pf = (float *)&i; *pf = 100.00; printf("\n %d", i); } a. Runtime error. b. 100 c. Some Integer not 100 d. None of the above

2 Answers   HCL, LG,


main() { int a=2,*f1,*f2; f1=f2=&a; *f2+=*f2+=a+=2.5; printf("\n%d %d %d",a,*f1,*f2); }

6 Answers  


main() { int i = 3; for (;i++=0;) printf(“%d”,i); }

1 Answers   CSC,


Write a C program to print look and say sequence? For example if u get the input as 1 then the sequence is 11 21 1211 111221 312211 12112221 .......(it counts the no. of 1s,2s etc which is in successive order) and this sequence is used in run-length encoding.

1 Answers  


#define SQR(x) x * x main() { printf("%d", 225/SQR(15)); } a. 1 b. 225 c. 15 d. none of the above

3 Answers   HCL,


Is it possible to print a name without using commas, double quotes,semi-colons?

7 Answers  


main() { int c = 5; printf("%d", main||c); } a. 1 b. 5 c. 0 d. none of the above

2 Answers   HCL,


program to find the roots of a quadratic equation

14 Answers   College School Exams Tests, Engineering, HP, IIIT, Infosys, Rajiv Gandhi University of Knowledge Technologies RGUKT, SSC,


Categories