can we define a function in structure?

Answer Posted / anandhi

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 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I direct output to the printer?

1066


What is a memory leak? How to avoid it?

890


Write a code to generate a series where the next element is the sum of last k terms.

983


What is clrscr in c?

891


What does struct node * mean?

812


Is sizeof a keyword in c?

771


What is maximum size of array in c?

782


disply the following menu 1.Disply 2.Copy 3.Append; as per the menu do the file operations 4.Exit

1844


What is #define in c?

827


Is array name a pointer?

822


Is a house a shell structure?

910


WHAT IS THE DEFINATION OF IN TECHNOLOGY AND OFF TECHNOLOGY ?

2103


write a program to rearrange the array such way that all even elements should come first and next come odd

2033


c programs are converted into machine language with the help of a) an interpreter b) a compiler c) an operatinf system d) none of the above

1018


What are the disadvantages of a shell structure?

956