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

How can I write a function that takes a format string and a variable number of arguments?

1002


Write a program to print "hello world" without using a semicolon?

1003


Why do we use pointer to pointer in c?

1019


Explain what does the format %10.2 mean when included in a printf statement?

1289


What are the different categories of functions in c?

1081


What is a const pointer in c?

1072


Define Spanning-Tree Protocol (STP)

1070


Write a program to print fibonacci series without using recursion?

1064


How can I do peek and poke in c?

1035


What is c preprocessor mean?

1238


An instruction which is analysed and acted upon by the processor prior to the compiler going its work a) directive b) constructive c) constant d) absolute mode

1029


What are the ways to a null pointer can use in c programming language?

1075


What is the code for 3 questions and answer check in VisualBasic.Net?

2100


Is register a keyword in c?

993


What is data type long in c?

1024