stamp logo

MAHFUZ3 MIRM

Advertisements

Fun programing

#include<stdio.h>

#define a (5+6)
#define b 9

int main ()
{

int sum ,product;
sum = a+b ;

product  =a*b;

printf(“This is sum : %d ,  This is product :%d \n ” , sum , product);
return 0;

}

Output: This is sum 20 and This is product 99 .
#include<stdio.h>

#define a 5+6
#define b 9

int main ()
{

int sum ,product;
sum = a+b ;

product  =a*b;

printf(“This is sum : %d ,  This is product :%d \n ” , sum , product);
return 0;

}

Output: This is sum 20 and  this is product 59 .

Try to fnd out what is wrong or why their output is different ?????