Q. What is the output of the following C code?


Category: C Programming Tags: C Programming, Interview Question

# include<stdio.h>
# define a 10
main()
{
printf("%d..",a);
foo();
printf("%d",a);
}
void foo()
{
#undef a
#define a 50
}

1) 10..10 2) 10..50 3) Error 4) 0


Like 1 Person
Asked on 21 May 2013
Nikhil Joshi

Nikhil Joshi
Ceo & Founder at Dotnetlovers
Atricles: 127
Questions: 9
Given Best Solutions: 8 *

Answers:

No Comments Yet

You are not loggedin, please login or signup to add comments:

Existing User

Login via:

New User



x