#include<stdio.h>
#include<stdlib.h>
int main () {
const char *string="21.3% are good" ;
double d;
char *stringptr;
d=strtod(string,&stringptr);
printf("%s\n%.2f\n%s\n",string,d,stringptr);
}
Have a Read!
Hi Everyone.
The idea for this page is to provide new c users simple c tutorials to learn how to develop the logic and more importantly correct way to write syntax.
ENJOY !!!
Sunday, February 6, 2011
How to use strod
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment