can we define a function in structure?
Answers were Sorted based on User's Feedback
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 |
What is the difference between macros and inline functions?
Why is this loop always executing once?
how to print 212 as Twohundreds twelve plz provide me ans soon
Calculate the weighted average of a list of n numbers using the formula xavg = f1x1+f2x2+ ….+ fnxn where the f’s are fractional weighting factors, i.e., 0<=fi<1, and f1+f2+….+fn = 1
Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;
an algorithem for the implementation of circular doubly linked list
how to write a program which adds two numbers without using semicolon in c
what are the various memory handling mechanisms in C ?
Define function pointers?
To what value do nonglobal variables default? 1) auto 2) register 3) static
Why is c platform dependent?
what does the following code do? fn(int n,int p,int r) { static int a=p; switch(n){ case 4:a+=a*r; case 3:a+=a*r; case 2:a+=a*r; case 1:a+=a*r; } } a.computes simple interest for one year b.computes amount on compound interest for 1 to 4 years c.computes simple interest for four year d.computes compound interst for 1 year