Hi
You can use the book "Pointer in C" by Yashawant Kanitkar or you can read "Writing TSRs in C" by Yashawant Kanitkar, the first 3 chapters to get an overview of the functions to pointers. Hope this helps you.
Well MSDN should provide enough information on this and not to forget the online help provided along with all compilers.
For a sample here is a short code..
..
#include <stdio.h>
void (*func)(int);
void myfunction (int x);
int main ()
{
func = myfunction; // associate to the function pointer
(*func)(10);
getch ();
Well, I have just decided to learn C about 1 to 2 months ago and now I am stuck on Converting binary numbers into decimals and viceversa can you help me on that?
To convert a string of 1's and 0's into a decimal number, you can use the standard library function strtoul:
e.g.
char bin[]="10001";
unsigned long dec=strtoul(bin,NULL,2);
The other way around, you can create a mask to compare your decimal number against and compare the number and the mask while repeatedly shifting the mask until all the bits have been looked at.
Here is a great link that explains the above with code examples:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.