Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
 SiteMap shows list of All Categories in this site.

 Categories  >>  Software  >>  Programming Languages  >>  C

 C Interview Questions C++ Interview Questions VC++ Interview Questions Delphi Interview Questions Programming Languages AllOther Interview Questions
Question
`can we define a function in structure?`
Question Submitted By :: Vatsava
I also faced this Question!!     Rank Answer Posted By

Re: can we define a function in structure?
# 1
structure is nothing but user defined data types...
structure used then more then one datatypes used in single
strud\cture...
syntax:
struct [struct_name]
{
datatype var1;
...
...
};
struct variable creation:
syntax:
struct [name]
{
...
...
}[struct var_name];
[struct var_name].variablename;
.......................................
ex:

 Is This Answer Correct ? 0 Yes 4 No
Anandhi

Re: can we define a function in structure?
# 2
We Can't define function inside the structure
 Is This Answer Correct ? 3 Yes 3 No
Sandeep

  Question Asked @ Answers Other C Interview Questions what is the difference between i++ and ++i? 5 Find the middle node in the linked list?? (Note:Do not use for loop, count and count/2) Subex 6 plz answer....A program that takes 3 variables e.g a,b,c in as seperate parameters and rotates the values stored so that value goes a to b, b to c and c to a . 3 If we have an array of Interger values, find out a sub array which has a maximum value of the array and start and end positions of the array..The sub array must be contiguious. Take the start add to be 4000. For Ex if we have an array arr[] = {-1,-2,-5,9,4,3,-6,8,7,6,5,-3} here the sub array of max would be {8,7,6,5} coz the sum of max contiguous array is 8+7+6+5 = 26.The start and end position is 4014(8) and 4020(5). Microsoft 5 #include #include void main() { int m=0111,n=20; printf("%d%d\n",m,n); getch(); } 1 What is sparse file? 1 actually i have 2 years teaching experience as computer faculty but now i am a DBA but when i go for interview many peoples asked me why i left my teaching profession and why i want to come in this field kindly give me the proper answer of this queston Ramco 3 int arr[] = {1,2,3,4} int *ptr=arr; *(arr+3) = *++ptr + *ptr++; Final contents of arr[] Hughes 6 Output for following program using for loop only * * * * * * * * * * * * * * * 3 what is difference between declaring the pointer as int and char in c language? 2 Why the below program throughs error during compilation? #include #include enum { ZERO, ONE, TWO, }; main() { printf("%d",&TWO); getch(); } 2 code for selection sort? 1 For more C Interview Questions Click Here