ExamVeda
Login
Home
This question belongs to C Program C Fundamentals
C Fundamentals
?

What is the difference between a declaration and a definition of a variable?

Answer & Solution
Correct Answer: Option D
Let's discuss the solution. Join the discussion
Examveda
Question posted by Examveda
Community

Join the Discussion

14 Comments
Sanjay Tiwari
Sanjay Tiwari 4 years ago
Correct ans is D
Int ino;
ino =10;
ino. =20;
Chethan Kumar
Chethan Kumar 5 years ago
A variable or function can be declaired many no of times, a defination can be define one time.
Kshitiz Saxena
Kshitiz Saxena 5 years ago
Yes ! The answer given is incorrect. The correct answer is Option B
Your Ssc
Your Ssc 6 years ago
What is definition
Nisha Nik
Nisha Nik 6 years ago
The declaration could be done multiple times either of a variable or of function.
Variable or function could be defined only once.
Its wrong
VISHNU Maram
VISHNU Maram 6 years ago
int main()
{
int a;
a=10;
{
int a;
a=1000;
printf("%d",a);
}
printf("% d",a);
}

o/p
1000 10

VISHNU Maram
VISHNU Maram 6 years ago
void main()
{
Archita Asthana
Archita Asthana 8 years ago
ans is b not d
declaration can be done many time but defination only once
Palagati Deepthi
Palagati Deepthi 9 years ago
answer for above question is B not D
Pratik Shete
Pratik Shete 9 years ago
thanks madhura and ayesha!
Gourav Garg
Gourav Garg 9 years ago
A declaration occurs once,but a definition may occur many times.Explain,I cannot understand this.
Madura Rajapakshe
Madura Rajapakshe 10 years ago
Declaration of variable mean to tell compiler their is a varfunctstruct of particular data type. Definition of variable mean asking compiler to allocate memory to variable or define storage for that variable. you can define a variable only one time but you can declare it as many time you want.
Ayesha Pathan
Ayesha Pathan 10 years ago
intially we declare the variable then we use dafination
Movie Mania
Movie Mania 10 years ago
plz explain