About 67,000 results
Open links in new tab
  1. Convert String to int in C - GeeksforGeeks

    Jul 23, 2025 · We can use sscanf () to easily convert a string to an integer. This function reads the formatted input from the string buffer, so we can use the format specifiers to read the numerical …

  2. How to convert a string to integer in C? - Stack Overflow

    Aug 11, 2011 · It's quite common that we want to convert numbers that are part of larger string, for example. A naive version with error handling support might look like the example below.

  3. Convert String to int in C (2026): atoi, strtol, sscanf, and a Safe ...

    2 days ago · What “convert a string to int” really means in C In C, a “string” is typically a null-terminated char* (bytes ending with ‘\0‘). Converting that to int isn’t a single operation—it’s a policy decision. …

  4. How to Convert a String to an Integer in C - Tutorial Kart

    In C, we can convert a string to an integer using functions like atoi(), strtol(), and sscanf(). These functions help parse numerical values from a string representation and store them as an integer type.

  5. How to Convert String to Int in C? 4 Ways With Code

    Learn four easy ways to convert a string to an int in C using atoi (), strtol (), sscanf (), and manual conversion. Includes code examples!

  6. C String to Int: Simple Ways to Convert to Numeric Values

    C String to Int: Learn some of the ways you can convert a string to an integer in the C programming language.

  7. How to convert a string to an integer in C - Educative

    In C, the atoi() function converts a string to an integer. The syntax for the function is given below: The function takes as input the string that is to be converted to an integer. If successfully executed, the …

  8. C Program to Convert String to Integer - BTech Geeks

    Jun 6, 2024 · C programming string to int: In this program we convert a string to integer without using atoi function. We first check that inputString [0] is ‘-‘ or not to identify negative numbers.

  9. How to Convert a String to Integer in C - Delft Stack

    Feb 2, 2024 · In C programming, converting a string to an integer is a common operation, and there are several methods available to accomplish this task. Three commonly used functions for this purpose …

  10. String to numeric value functions | Microsoft Learn

    Jan 31, 2023 · Each function in the strto* family converts a null-terminated string to a numeric value. The available functions are listed in the following table. wcstod, wcstol, wcstoul, and _wcstoi64 are wide …