Can anyone clear this doubt..??

First C compiler program compiled on which compiler..???

void main()
int x=4,i;
int fun(int c)
return c/2;

the answer is reply ....

that prog doesn't give output 1. definitely output will be 0 only. because fun returns 1/2 i.e 0.5 but fun return type is int so fun returns 0 only.. check ur code once again

int &maxref(int &a, int &b)
if (a>b)
return a;
return b;
void main()
int x=20,y=30, max=0;
cout<<"\n value of x is :"<<x;
cout<<"\n value of y is :"<<y;

This program output is
value of xis 20
value of y is : -1
but how to get this output?
help me.

because fun returns variable as return type is int &. if & is omitted in fun return type,value will be returned but it leads to error as invalid assignment in main function (20=-1).

>First C compiler program compiled on which compiler..???
Unknown, but probably either an assembler or Ken Thompson's B compiler on the PDP-11.