#define a 10
void foo()
{
#undef a
#define a 50
}

int main()
{
printf("%d..",a);
foo();
printf("%d..",a);
return 0;
}
explain the answer



#define a 10 void foo() { #undef a #define a 50 } int main() { printf(..

Answer / ilakkiyakandasamy

50..50..

Is This Answer Correct ?    4 Yes 0 No

Post New Answer

More C Code Interview Questions

main() { int i; i = abc(); printf("%d",i); } abc() { _AX = 1000; }

2 Answers  


Write a complete program that consists of a function that can receive two numbers from a user (M and N) as a parameter. Then print all the numbers between the two numbers including the number itself. If the value of M is smaller than N, print the numbers in ascending flow. If the value of M is bigger than N, print the numbers in descending flow. may i know how the coding look like?

2 Answers  


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

7 Answers  


Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal.

6 Answers   Fusion Systems GmbH,


Give a very good method to count the number of ones in a 32 bit number. (caution: looping through testing each bit is not a solution)

7 Answers   Microsoft,






programming in c lanugaue programm will errror error with two header file one as stdio.h and other one is conio.h

1 Answers  


main ( ) { static char *s[ ] = {“black”, “white”, “yellow”, “violet”}; char **ptr[ ] = {s+3, s+2, s+1, s}, ***p; p = ptr; **++p; printf(“%s”,*--*++p + 3); }

1 Answers  


/*what is the output for*/ void main() { int r; printf("Naveen"); r=printf(); getch(); }

4 Answers  


write a program for area of circumference of shapes

0 Answers  


C program to print magic square of order n where n > 3 and n is odd

2 Answers   Accenture,


#include<stdio.h> main() { struct xx { int x; struct yy { char s; struct xx *p; }; struct yy *q; }; }

2 Answers  


Under linux environment can u please provide a c code for computing sum of series 1-2+3-4+5......n terms and -1+2-3+4-5...n terms..

2 Answers  


Categories