SCHOOL OF CODE BUILDERS
Learn To CODE. Become A DEVELOPER.
Pages
HOME
DATA STRUCTURES
STRINGS
ARRAYS
MATRIX
BINARY TREES
LINKED LIST
STACK
QUEUE
SORTING
SEARCHING
C
PYTHON
PSEUDOCODE
CONTEST PROBLEMS
ALGORITHMS
PATTERNS
PHP
C PUZZLES
C INTERVIEW QUESTIONS
JAVA
C++
HASHING
RECURSION
BASIC C PROGRAMS
TCS-CODEVITA
FACEBOOK
CONTACT US
Convert string to int using library function in c
Convert string to int using library function in c
Input:
Enter the string: 1234
Output:
The string 1234 is converted as number 1234
Implementation:
#include
#include
#include
int main(void) { char s[1000000]; int n; printf("Enter the string:\n"); scanf("%s",s); n=atoi(s); printf("The string %s is converted as number %d",s,n); return 0; }
PREVIOUS
NEXT
HOME