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

The number of bytes of storage occupied by short, int and long are a) 2, 2 and 4 b) 2, 4 and 4 c) 4, 4 and 4 d) none

767


Is stack a keyword in c?

638


Explain can you assign a different address to an array tag?

648


Why is C language being considered a middle level language?

658


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

597






Why malloc is faster than calloc?

593


Can you write the function prototype, definition and mention the other requirements.

664


what do the 'c' and 'v' in argc and argv stand for?

647


What are the main characteristics of c language describe the structure of ac program?

614


What is data structure in c programming?

575


What is a good way to implement complex numbers in c?

597


"%u" unsigned integer print the a) address of variable b) value of variable c) name of a variable d) none of the above

616


What are high level languages like C and FORTRAN also known as?

687


How can I open a file so that other programs can update it at the same time?

664


write a program to find the given number is prime or not

3847