Dear friends,
Somebody asked me in interview that
1) how operator loading can be implemented in C. Give any example...
>> this is related to c++ only
2) Give an example of Union Application
>> union can be used for storing the data when you are writting some structure in which based upon pror value you have to fill state of object like
struct test{
int i;
union condition{
char c;
int d;
}
}
suppose i = 0 then condition will having value of char otherwise int then you can write it like this.
3) Give an example of function pointer s use...
>> The best example of function pointer is for the implimentation of FSM(finite state machine).