Wednesday, 3 July 2013

2

#include<stdio.h>
#define prod(a,b) a*b
int main () {
int x=3,y=4,z;
z=prod(3+2,y-1);
printf(":%d",z);
}
 
 
 
 
 
 
Solution: 10...but not 15,bcoz compiler'll take it as 3+2*4-1 = 10 but not same as (3+2)*(4-1)
 

1

int main()
{
int j=0;
j=j+printf("");
printf("%d",j);5
j=j+printf("hello");
printf("%d",j);
return 0;
}
 Find the output....



 
Solution:  0hello5- coz j 'll return the number of characters in dat word.....
 
Join me on Facebook