atol c.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main () {
long val;
char str[20];
strcpy(str, "98993489");
val = atol(str);
printf("String value = %s, Long value = %ld\n", str, val);
strcpy(str, "tutorialspoint.com");
val = atol(str);
printf("String value = %s, Long value = %ld\n", str, val);
return(0);
}
Are there any code examples left?
New code examples in category C
-
C 2022-03-27 22:30:45 Problem Statement Print the following output: \ Input Format IN Output Format \
-
-
-
-
-
-
-