Introduction To Programming

Why programs ? Programming is nothing but making the computers think the same way a human thinks. Programs are made for obtaining a specific solution which can even be solved by humans which when solved by us may consume time..

Sunday, August 15, 2010

Predict the output for this program

int main( )
{
printf("%d",printf("%d %d",5,5)&printf("%d %d",7,7));
return 0;
}

1 7 7 5 5
7 7 5 5 1
5 5 7 7 3
7 7 5 5 3

What is the output of the following program?

int main( )
{
printf(" %d %d",printf("%d %d",7,7),printf("%d %d",5,5));
return 0;
}


7 7 5 5 3 3
5 5 7 7 3 3
3 3 7 7 5 5
3 3 5 5 7 7