ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C
 
 


 

 
 C interview questions  C Interview Questions
 C++ interview questions  C++ Interview Questions
 VC++ interview questions  VC++ Interview Questions
 Delphi interview questions  Delphi Interview Questions
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions
Question
difference between  function & structure
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: difference between function & structure
Answer
# 1
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 ?    0 Yes 0 No
Samarasam
 
  Re: difference between function & structure
Answer
# 2
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 ?    0 Yes 0 No
Shruti
 
 
 
  Re: difference between function & structure
Answer
# 3
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 ?    0 Yes 0 No
Babitha_b
[HCL Technologies]
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
main() { char *p1="Name"; char *p2; p2=(char *)malloc(20); while(*p2++=*p1++); printf("%s\n",p2); } CitiGroup3
what is the difference between #include<stdio.h> and #include"stdio.h" ? TCS4
Write a program or provide a pseudo code to flip the 2nd bit of the 32 bit number ! (Phone Screen) NetApp1
How does C++ help with the tradeoff of safety vs. usability?  1
We can draw a box in cprogram by using only one printf();& without using graphic.h header file? NIIT2
What is the difference between char a[] = "string"; and char *p = "string"; ? Honeywell8
Which command is more efficient? *(ptr+1) or ptr[1]  3
Explain the differences between public, protected, private and internal.  1
Write a function that accepts two numbers,say a and b and makes bth bit of a to 0.No other bits of a should get changed. Scientific-Atlanta2
How can I invoke another program from within a C program?  1
study the code: #include<stdio.h> void main() { const int a=100; int *p; p=&a; (*p)++; printf("a=%dn(*p)=%dn",a,*p); } What is printed? A)100,101 B)100,100 C)101,101 D)None of the above Accenture12
int *p=20; if u print like dis printf("%d",p); o\p:- 20; how is it possible? plz give me the explanation. Global-Edge5
Study the Following Points: a.One Cannot Take the address of a Bit Field b.bit fields cannot be arrayed c.Bit-Fields are machine Dependant d.Bit-fields cannot be declared as static 1. Which of the Following Statements are true w.r.t Bit- Fields A)a,b&c B)Only a & b C)Only c D)All Accenture1
Program to find the absolute value of given integer using Conditional Operators N-Tech2
what is the differnce between AF_INET and PF_INET? Wipro1
How do we swap or interchange any 2 numbers without using Temporary variable...Anybody can pls answer it.. Thanks in Advance US-Technology5
read the folllowing code # define MAX 100 # define MIN 100 .... .... if(x>MAX) x=1; else if(x<MIN) x=-1; x=50; if the initial value of x=200,what is the vlaue after executing this code? a.200 b.1 c.-1 d.50 TCS2
write a program to check whether a given integer is a strong number or not? [Hint: 145=1!+4!+5! =1+24+120 =145]  2
What are advantages and disadvantages of recursive calling ? HP6
write a addition of two no. program with out using printf,scanf,puts .  2
 
For more C Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com