ankit.batra11
BAN USERYes, you can. Preceding the declaration with static defaults to internal linkage for the function which means function can only be accessed within the file in which it has been declared (i.e. those files where you are including your .h file). So, every file will have its own definition (allocated memory for) of your function and hence can be used in any number of files.
- ankit.batra11 April 21, 2012Reverse the rows first and then the columns.
- ankit.batra11 April 21, 2012To find the number of bits set in a number:
while(num !=0)
num &= num - 1;
Best sol, will run only for the no. Of bits set in the no.
Sole purpose of having virtual functions is code maintenance and nothing else.
Suppose you wrote a code which is based on calling virtual functions of a base class, that code will be independent of how many classes you derive from the base (but will have the power of calling newer derived versions of the virtual functions) and hence better the code maintainability.
really?? with abc -> ac already given to you??
- ankit.batra11 May 29, 2013obviously, abcd -> acd holds true in current context.