Tagged Questions
-2
votes
0answers
98 views
Please tell me the output of this C program and also explain how it comes? [closed]
void xyz(int x)
{
printf("\n%d",x);
if(x)
xyz(x-1)
printf("\n%d",x);
}
void abc(int a)
{
printf("\n%d",a);
xyz(a);
if(a)
abc(a-1);
printf("\n%d",a);
}
void main()
{
abc(2);
}
13
votes
1answer
580 views
Why does the C library use macros and functions with same name?
I am reading 'The Standard C Library' by PJ Plauger which is really interesting. The book explains not only how to USE the library but also how it is implemented.
I have finished reading the ctype.h ...
3
votes
3answers
329 views
How are functions called when passing ++
I don't understand what is passed to the function f() when I call it like this.
main()
{
void f(int,int);
int i=10;
f(i,i++);
}
void f(int i,int j)
{ printf("%d %d",i,j); }
gives me 11 10 ...