The atoi() function converts a string into a number.
Examples:
#include<stdlib.h>
#include<stdio.h>
int main()
{ char str[]=“123”; int a; a=atoi(str); / Convert a string into an int type number / printf("%d\n",a);
} The
output is 123
The atoi() function converts a string into a number.
Examples:
#include<stdlib.h>
#include<stdio.h>
int main()
{ char str[]=“123”; int a; a=atoi(str); / Convert a string into an int type number / printf("%d\n",a);
} The
output is 123