Variables and constants must be declared before they can be used in a program. Why is it important to declare a variable? How are constants declared differently than variables? Please explain your answer in 3 sentences or more.
int var;
int var = 5;
___________________________________________________________________
const float pi = 3.141
___________________________________________________________________
Note: If you have queries or confusion regarding this question, please leave a comment. I would be happy to help you. If you find it to be useful, please upvote.
Get Answers For Free
Most questions answered within 1 hours.