If I have an integer variable I can use sscanf as shown below by using the format specifier %d.
sscanf
sscanf (line, \"Value of integer: %d\\n\", &
Refer to this for sscanf usage.
These datatypes are defined in stdint.h. Refer here for stdint.h
Shash