Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

how to cast string to int in c

use atoi from the stdlib.h 
char *string = "hi";
int x = atoi(string);
Source by www.interviewbit.com #
 
PREVIOUS NEXT
Tagged: #cast #string #int
ADD COMMENT
Topic
Name
7+7 =