Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what is the difference between declaration and definition
of a variable or function ?

Answer Posted / suman_kotte

declares a function, but that does not define it.
declaration describes whether the function consist
arguments or not and also it will return a value or not.

definition must be as per the function declaration that was
declared rearlier.it will for the out put of that function.

ex;

main()
{
int a=1,b=2;
void sum(int , int );//declaration
sum(a,b);
}
void sum(int x, int y)//definition
{
printf("%d",x+y);
}

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what is the difference between a free-standing and a hosted environment?

1239


What is a const pointer in c?

1182


Synonymous with pointer array a) character array b) ragged array c) multiple array d) none

1110


Is c is a low level language?

1210


Why do we use header files in c?

1126


Is linux written in c?

1084


What is %g in c?

1122


How can you draw circles in C?

1197


What is %d used for?

1091


What is the difference between printf and scanf in c?

1429


Write a program to check prime number in c programming?

1149


What is a char in c?

1042


What is auto keyword in c?

1251


What is a sequential access file?

1245


Why C language is a procedural language?

1096