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...

difference between function & structure

Answer Posted / vignesh1988i

1st :
FUNCTIONS :
these are derived data types
STRUCTURES :
these are user defined datatypes

2nd :
FUNCTIONS :
function returns a value
STRUCTURES :
structures is not a function but only a datatype which returns no value.

3rd :
FUNCTIONS :
function does not have a provision of self referencial pointers.
STRUCTURES :
in this we can make one data member as a pointer to the same structure. that is self referencial structures.

4th :
FUNCTIONS :
function s consists of formal as well as actual arguments.
STRUCTURES :
here structures is a special datatype which holds all the possible form of data (i.e) int, char,float,double ,in combination s.

5th :
FUNCTIONS :
functions are reusable anytime and anywhere in the program, whenever we wann to re-use the code again we can simply call the function.
STRUCTURES :
but in structures we can do as above,we must access the data using '.' or when comes to pointers we must access through '->' operator



this are the statements that to my knowledge can said as difference... BUT STRUCTURES CANNOT BE COMPARED WITH FUNCTION SINCE, TWO ARE INDEPENDENT TO EACH OTHER.

THANK U

Is This Answer Correct ?    78 Yes 18 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When reallocating memory if any other pointers point into the same piece of memory do you have to readjust these other pointers or do they get readjusted automatically?

1208


What are qualifiers and modifiers c?

938


Are the expressions * ptr ++ and ++ * ptr same?

1087


Is exit(status) truly equivalent to returning the same status from main?

1007


What is action and transformation in spark?

1081


Can you please explain the difference between strcpy() and memcpy() function?

1014


Why do some versions of toupper act strangely if given an upper-case letter?

1034


Why is sizeof () an operator and not a function?

980


Is using exit() the same as using return?

1247


What are the keywords in c?

1077


Q.1 write a program to create binary tree 1 to 16 numbers? Q.2 write a program to creat a binary search tree for the member that is given by user?

2498


what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;

2365


Can you assign a different address to an array tag?

1109


The file stdio.h, what does it contain?

1115


How do you list a file’s date and time?

1020