Variables and Functions Introduction in C
- Providing identities to standard memory locations.
- Without identities, we cannot access the data once it has been stored.
- Named memory location.
- Using variables we can process the information effectively.
Method or Function :
- A block of instructions having Identity.
- Every method is taking input, processing input and returns output.
- Every method must be called explicitly (using its identity).
- Every method is having 2 main things.
- Function definition (block of statements)
- Function call (Single statement)
Why do we need to call a method explicitly?
- Look at the example shown in the diagram.
- Every electronic device (program) having much-inbuilt functionality.
- But the functionality of any program will not execute automatically(TV will not be controlled itself)