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

Answers were Sorted based on User's Feedback



difference between function & structure..

Answer / shruti

functions can return values.
structures cannot return values.

we can pass arguments to the function
we cannot pass any argument to the structure.

Is This Answer Correct ?    115 Yes 20 No

difference between function & structure..

Answer / 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

difference between function & structure..

Answer / samarasam

I) Inside the Structure we can use Property,Indexes,etc..
II) Both constants and enumerations may be defined within a
structure,
III) Multiple constructors can be created within a
structure.
IV) EVENTS is possible in structures
v) Memory wise differ

Is This Answer Correct ?    31 Yes 15 No

difference between function & structure..

Answer / nixiemae

Structure: The way in which the components, plan, designs
are interrelated that is structure.

Function: The Operation of each individual component as part
of the structure.

Is This Answer Correct ?    18 Yes 4 No

difference between function & structure..

Answer / lakkup

structure:it holds dissimiliar datatypes when compared to
array.

function:it is used when an operation has to be done by
skipping some of the stepsi.e., function call

Is This Answer Correct ?    12 Yes 5 No

difference between function & structure..

Answer / babitha_b

Functions:
a)used to separate the task which would run frequently
b)run seperately the frequent task whenever calling that
frequent task and then returned its value to the fucntion
who called this.
c)would decrease the complexity of code and helps to debug
easier.
d)also it can be used as a library fucntion.

Structure:
declaring different types of variables and functions under
single name.

Is This Answer Correct ?    14 Yes 11 No

difference between function & structure..

Answer / muhammad bilal

Structure:-

"Way in which components interconnect to each others"

Function:-

"Operation of individual behave as part of structure "

Is This Answer Correct ?    3 Yes 5 No

difference between function & structure..

Answer / geta

FUNCTION:-FUNCTION IS A COLLECTION OF SIMILAR DATA TYPES.

STRUCTURE:-STRUCTURE IS A COLLECTION OF DIFFERENT DATA TYPES

Is This Answer Correct ?    13 Yes 17 No

difference between function & structure..

Answer / s.s gill

function: in function we can have different data types and can perform different operation according to our need. a function once created can be called anytime in given program.

Structure: in structure we can only assign data types to different variables that are to be used in our program. we cannot perform any operation inside a structure.

this is the major difference between function and structure

Is This Answer Correct ?    2 Yes 6 No

Post New Answer

More C Interview Questions

what is the difference between char * const and const char *?

2 Answers   TCS,


write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.

0 Answers   Lovely Professional University,


Can you tell me how to check whether a linked list is circular?

1 Answers  


What's wrong with "char *p = malloc(10);" ?

4 Answers  


Whats wrong with the following function char *string() { char *text[20]; strcpy(text,"Hello world"); return text; }

3 Answers   Qualcomm,


what are the facialities provided by you after the selection of the student.

0 Answers   TCS,


What is ctrl c called?

0 Answers  


if a is an integer variable, a=5/2; will return a value a) 2.5 b) 3 c) 2 d) 0

0 Answers  


question-how to run a c programme.

6 Answers  


WHAT WILL BE OUTPUT OF BELOW CODE . . AND PLEASE EXPLAIN HOW IT COME .. #include<stdio.h> #include<conio.h> void main() { int k=20; printf("%d%d%d%d",k,k++,++k,k); getch(); }

25 Answers  


What kind of sorting is this? SORT (k,n) 1.[Loop on I Index] repeat thru step2 for i=1,2,........n-1 2.[For each pass,get small value] min=i; repeat for j=i+1 to N do { if K[j]<k[min] min=j; } temp=K[i];K[i]=K[min];K[min]=temp; 3.[Sorted Values will be returned] A)Bubble Sort B)Quick Sort C)Selection Sort D)Merge Sort

3 Answers   Accenture,


Can we change the value of #define in c?

0 Answers  


Categories