Answers for "type cast from string to int in c"

C
1

how to convert string to integer in c

#include <stdio.h>
#include <stdlib.h>
int main()
{
    char ch[]="123";
    int a=atoi(ch);
    printf("%d",a);
    return 0;
}
Posted by: Guest on April-14-2022

Code answers related to "C"

Browse Popular Code Answers by Language