can we define a function in structure?

Answers were Sorted based on User's Feedback



can we define a function in structure?..

Answer / sandeep

We Can't define function inside the structure

Is This Answer Correct ?    4 Yes 3 No

can we define a function in structure?..

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

More C Interview Questions

Explain how do you sort filenames in a directory?

0 Answers  


please give me some tips for the selection in TCS.

3 Answers   TCS,


What is the difference b/w Structure & Class?

3 Answers  


Explain how can you tell whether two strings are the same?

0 Answers  


What is period operator in c?

3 Answers   Wipro,






can please someone teach me how to create this program using while statement.. this is the output should look like 0 2 4 6 8 10 -thanks.. :) need it asap...

7 Answers  


Write a program to print factorial of given number using recursion?

0 Answers  


What is the correct code to have following output in c using nested for loop?

0 Answers  


What is a rvalue?

0 Answers   Global Logic,


What is the difference between specifying a constant variable like with constant keyword and #define it? i.e what is the difference between CONSTANT FLOAT A=1.25 and #define A 1.25

0 Answers  


Write a program to generate prime factors of a given integer?

2 Answers  


Hai why 'c' is the middle language

4 Answers  


Categories