Home / Questions / What is Variable Declaration ?
Explanatory Question

What is Variable Declaration ?

👁 829 Views
📘 Detailed Answer
🕒 Easy to Read
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.

Answer with Explanation

Variables should be declared either outside a function or at the start of a block of code, after the opening { and before any other statements.

int miles, yards; /* global variables */
main()
{
float kilometres; /* local variables */