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

application attempts to perform an operation?

0 Answers  


Explain function?

0 Answers  


1.int a=10; 2.int b=20; 3. //write here 4.b=30; Write code at line 3 so that when the value of b is changed variable a should automatically change with same value as b. 5.

0 Answers  


write a C program to print the program itself ?!

16 Answers   TCS,


what are the stoge class in C and tel the scope and life time of it?

2 Answers   Tech Mahindra,






What is pointer to pointer in c with example?

0 Answers  


Explain what is a const pointer?

0 Answers  


Write a program to find the number of times that a given word(i.e. a short string) occurs in a sentence (i.e. a long string!). Read data from standard input. The first line is a single word, which is followed by general text on the second line. Read both up to a newline character, and insert a terminating null before processing. Typical output should be: The word is "the". The sentence is "the cat sat on the mat". The word occurs 2 times.

0 Answers  


How to compare array with pointer in c?

0 Answers  


1.)how to find d most repeated word in a string? string ="how do you do"?? output should be do

1 Answers   AAS, Nagarro, Vuram,


What is stack in c?

0 Answers  


Write a program to print distinct words in an input along with their count in input in decreasing order of their count

0 Answers  


Categories