18 lines
337 B
C
18 lines
337 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
|
|
int main () {
|
|
int val;
|
|
char str[20];
|
|
|
|
strcpy(str, "19489");
|
|
val = atoi(str);
|
|
printf("String value = %s, Int value = %d\n", str, val);
|
|
|
|
strcpy(str, "C course");
|
|
val = atoi(str);
|
|
printf("String value = %s, Int value = %d\n", str, val);
|
|
|
|
return(0);
|
|
} |