What is the difference between typedef and #define

Questions by puja_ag16   answers by puja_ag16

Showing Answers 1 - 3 of 3 Answers

narendra

  • Apr 22nd, 2007
 

#DEFINE IS used to give a constant value to a variable
example if #DEFINE PI 3.14 is used then the value 3.14 is used where ever we use the variable PI.
TYPE DEF is the user defined name to an already existing keyword, ex.
We can use AMOUNT as a USER DEFINED name in place of FLOAT keyword.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions