Skip to content

Instantly share code, notes, and snippets.

@pelle
Created December 10, 2010 20:26
Show Gist options
  • Save pelle/736758 to your computer and use it in GitHub Desktop.
Save pelle/736758 to your computer and use it in GitHub Desktop.
int gold_coin;
int* dollar_bill;
gold_coin = 100;
dollar_bill = &gold_coin;
if (dollar_bill == gold_coin )
printf("Dollar bill has same intrinsic value as gold coin\n");
else
printf("Dollar bill does not have same intrinsic value as gold coin\n");
if (*dollar_bill == gold_coin )
printf("Dollar bill has same extrinsic value as gold coin\n");
else
printf("Dollar bill does not have same extrinsic value as gold coin\n");
/* Output:
Dollar bill does not have same intrinsic value as gold coin
Dollar bill has same extrinsic value as gold coin
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment