What is the difference between declaration and definition?

Answer Posted / ganesh9948302505

Declaration of a function is COMPILATION PHASE,inorder to
support the SIGNATURE OF FUNCTION like function
name,arguments. Simply it identifies FUNCTION.

Where as in defination, function cotains SET OF
STATEMENTS and expands SOURCE CODE in the form of
instructions
(all this is concept of functions)

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the important components of cohesion?

557


What is destructor oops?

625


write a program to find 2 power of a 5digit number with out using big int and exponent ?

1899


Can a varargs method be overloaded?

619


What do you mean by overloading?

586






#include #include #include #include void insert(struct btreenode **, int); void inorder(struct btreenode *); struct btreenode { struct btreenode *leftchild; struct btreenode *rightchild; int data; }; main() { struct btreenode *bt; bt=(struct btreenode *)NULL; int req,i=1,num; clrscr(); printf("Enter number of nodes"); scanf("%d",&req); while(i<=req) { printf("Enter element"); scanf("%d",&num); insert(&bt,num); i++; } inorder(bt); } void insert(struct btreenode **sr, int num) { if(*sr==NULL) { *sr=(struct btreenode *)malloc (sizeof(struct btreenode)); (*sr)->leftchild=(struct btreenode *)NULL; (*sr)->rightchild=(struct btreenode *)NULL; (*sr)->data=num; return; } else { if(num < (*sr)->data) insert(&(*sr)->leftchild,num); else insert(&(*sr)->rightchild,num); } return; } void inorder(struct btreenode *sr) { if(sr!=(struct btreenode *)NULL) { inorder(sr->leftchild); printf("\n %d",sr->data); inorder(sr->rightchild); } else return; } please Modify the given program and add two methods for post order and pre order traversals.

3257


what type of questions

1697


What is the real time example of encapsulation?

602


Plese get me a perfect C++ program for railway/airway reservation with all details.

3431


What is polymorphism and types?

604


What is multilevel inheritance in oop?

557


what are the different types of qualifier in java?

1847


write a program to find 2^n+1 ?

1555


write a code for this:trailer recordId contains a value other than 99, then the file must error with the reason ‘Invalid RECORD_ID’(User Defined Exception).

1647


What is object in oops?

617