- Atoi = A to I = Alphabet to Integer
- Convert String of number into Integer
num = atoi(String);
num - Integer Variable String- String of NumbersExample :
Output :num = atoi("1947"); printf("%d",num);
Significance :1947
- Can Convert any String of Number into Integer Value that can Perform the arithmetic Operations like integer
- Header File : stdlib.h
Way 1 : Passing Variable in Atoi Function
Way 2 : Passing Direct String in Atoi Function// Variable marks is of Char Type int num; char marks[3] = "98"; num = atoi(marks); printf("\nMarks : %d",num);
int num; num = atoi("98"); printf("\nMarks : %d",num);
0 Comments:
Post a Comment
Your Feedback :This is Growing Site and Your Feedback is important for Us to improve the Site performance & Quality of Content.Feel Free to contact and Please Provide Name & Contact Email