How do we declare an array of N pointers to functions that return int??
An array of N pointers to integers is this: int *p[N]
Just can't figure out the case for pointers to function
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view
Is it right??
declare an array of pointers like, int *func[N];
and since they are pointers to functions, modify above as, int
(*func[N])();
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
@Rajeev:
How will you update the position of each element in the linked list after
removing a particular element? Won't you have to traverse the list
completely in which case your algo will be O(n^2) ??
--
You received this message because you are subscribed to the Google Groups
Algorithm
@Rajeev: Okay, I am using C which has no such facilities of auto indexing
the list..
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
https://groups.google.com/d/msg/algogeeks/-/BsMmVwxw_T4J.
To post
Only a warning in Dev C++ due to no variable declaration of inner structure
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
https://groups.google.com/d/msg/algogeeks/-/HtevjjeGDZoJ.
To post to this
No, it's wrong to say that sizeof() can't be applied to functions. It's an
operator and can take the function name as its operand.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
#includestdio.h
#includemath.h
int set_bits(int a)
{
int c=0;
while(a)
{
if(a 1)
c++;
a =1;
}
return c;
}
void sub(int a[],int n,int k)
{
int i; int x,c=0,j;
x = pow(2,n);
for(i=0;ix;i++) //this statement is exec 2^n
@Ankita: So when is 4000 memory address is allotted?? I mean what use does
int *p = 4000 serve here??
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit