what is the difference between declaration ,defenetion and
initialization of a variable?

Answer Posted / shabeer v c

A good example to illustrate this Question ges like this:

Whenever we apply for a job the company declares that we
have been selected. Similarly we declare a variable like

int emp;
(here emp behaves as an employee).

Then he will be assigned with a initial salary which
will be incremented in course of time period or on
experience basis.
Similarly the variable int is assigned a initial
value.
i.e int emp=20;
(value can be changed in between program)

The employee is now identified by his post, which can
define his status in the company.
Same way the variable is also defined in the
program.
ie. int emp;

Is This Answer Correct ?    16 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is binary tree in c?

625


What does d mean?

587


What is register variable in c language?

607


What is malloc and calloc?

576


What is the best organizational structure?

644






How do we open a binary file in Read/Write mode in C?

681


Write a program to swap two numbers without using third variable?

816


Explain the process of converting a Tree into a Binary Tree.

2107


a c code by using memory allocation for add ,multiply of sprase matrixes

2305


What is the use of a semicolon (;) at the end of every program statement?

776


What do you mean by a sequential access file?

630


What are the applications of c language?

627


Write a programme using structure that create a record of students. The user allow to add a record and delete a record and also show the records in ascending order.

1621


What is an arrays?

656


What is f'n in math?

622