{"id":2475,"date":"2025-07-17T08:06:12","date_gmt":"2025-07-17T07:06:12","guid":{"rendered":"https:\/\/workboot.fr\/ciela\/?page_id=2475"},"modified":"2025-07-17T08:20:38","modified_gmt":"2025-07-17T07:20:38","slug":"atoi","status":"publish","type":"page","link":"https:\/\/workboot.fr\/ciela\/atoi\/","title":{"rendered":"atoi()"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">lire a to i ,  ascii vers integer !<\/p>\n\n\n\n<details class=\"wp-block-details is-layout-flow wp-block-details-is-layout-flow\"><summary>man 3 atoi<\/summary>\n<pre class=\"wp-block-code\"><code>atoi(3)                                                     Library Functions Manual                                                     atoi(3)\n\nNAME\n       atoi, atol, atoll - convert a string to an integer\n\nLIBRARY\n       Standard C library (libc, -lc)\n\nSYNOPSIS\n       #include &lt;stdlib.h&gt;\n\n       int atoi(const char *nptr);\n       long atol(const char *nptr);\n       long long atoll(const char *nptr);\n\n   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):\n\n       atoll():\n           _ISOC99_SOURCE\n               || \/* glibc &lt;= 2.19: *\/ _BSD_SOURCE || _SVID_SOURCE\n\nDESCRIPTION\n       The atoi() function converts the initial portion of the string pointed to by nptr to int.  The behavior is the same as\n\n           strtol(nptr, NULL, 10);\n\n       except that atoi() does not detect errors.\n\n       The  atol()  and  atoll() functions behave the same as atoi(), except that they convert the initial portion of the string to their return\n       type of long or long long.\n\nRETURN VALUE\n       The converted value or 0 on error.\n\nATTRIBUTES\n       For an explanation of the terms used in this section, see attributes(7).\n       \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n       \u2502 Interface                                                                                            \u2502 Attribute     \u2502 Value          \u2502\n       \u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n       \u2502 atoi(), atol(), atoll()                                                                              \u2502 Thread safety \u2502 MT-Safe locale \u2502\n       \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n\nVERSIONS\n       POSIX.1 leaves the return value of atoi() on error unspecified.  On glibc, musl libc, and uClibc, 0 is returned on error.\n<\/code><\/pre>\n<\/details>\n\n\n\n<pre class=\"wp-block-code\"><code>int atoi(const char *nptr);<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Pour l&rsquo;utiliser , il faut inclure la librairie <strong>stdlib.h<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">transforme une cha\u00eene de caract\u00e8res en entier,  si la cha\u00eene contient \u00ab\u00a01234\u00a0\u00bb   l&rsquo;entier renvoy\u00e9 par atoi sera 1234<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">remarque si c&rsquo;est une cha\u00eene ne repr\u00e9sentant rien de num\u00e9rique interpr\u00e9table la fonction renvoie 0<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">atoi_example.c:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;stdio.h&gt;\n#include &lt;stdlib.h&gt;\n\nint main(int argc, char *argv&#91;])\n{\n    int n;\n\n    if (argc != 2) {\n        printf(\"Usage: %s &lt;number&gt;\\n\", argv&#91;0]);\n        return 1;\n    }\n\n    n = atoi(argv&#91;1]);\n\n    printf(\"Vous avez entr\u00e9 le nombre : %d\\n\", n);\n\n    return EXIT_SUCCESS;\n}\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>gcc -o atoi_example atoi_example.c\n.\/atoi_example 10\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Vous avez entr\u00e9 le nombre : 10<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>lire a to i , ascii vers integer ! Pour l&rsquo;utiliser , il faut inclure la librairie stdlib.h transforme une cha\u00eene de caract\u00e8res en entier, si la cha\u00eene contient \u00ab\u00a01234\u00a0\u00bb [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","_uag_custom_page_level_css":"","footnotes":""},"class_list":["post-2475","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>atoi() - workboot<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/workboot.fr\/ciela\/atoi\/\" \/>\n<meta property=\"og:locale\" content=\"fr_FR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"atoi() - workboot\" \/>\n<meta property=\"og:description\" content=\"lire a to i , ascii vers integer ! Pour l&rsquo;utiliser , il faut inclure la librairie stdlib.h transforme une cha\u00eene de caract\u00e8res en entier, si la cha\u00eene contient \u00ab\u00a01234\u00a0\u00bb [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/workboot.fr\/ciela\/atoi\/\" \/>\n<meta property=\"og:site_name\" content=\"workboot\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-17T07:20:38+00:00\" \/>\n<meta name=\"twitter:label1\" content=\"Dur\u00e9e de lecture estim\u00e9e\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/atoi\\\/\",\"url\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/atoi\\\/\",\"name\":\"atoi() - workboot\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/#website\"},\"datePublished\":\"2025-07-17T07:06:12+00:00\",\"dateModified\":\"2025-07-17T07:20:38+00:00\",\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/workboot.fr\\\/ciela\\\/atoi\\\/\"]}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/#website\",\"url\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/\",\"name\":\"workboot\",\"description\":\"Open Source, Open Minds \",\"publisher\":{\"@id\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"fr-FR\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/#organization\",\"name\":\"workboot\",\"url\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/logo_ciel-dorian-1.png\",\"contentUrl\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/logo_ciel-dorian-1.png\",\"width\":1024,\"height\":950,\"caption\":\"workboot\"},\"image\":{\"@id\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"atoi() - workboot","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/workboot.fr\/ciela\/atoi\/","og_locale":"fr_FR","og_type":"article","og_title":"atoi() - workboot","og_description":"lire a to i , ascii vers integer ! Pour l&rsquo;utiliser , il faut inclure la librairie stdlib.h transforme une cha\u00eene de caract\u00e8res en entier, si la cha\u00eene contient \u00ab\u00a01234\u00a0\u00bb [&hellip;]","og_url":"https:\/\/workboot.fr\/ciela\/atoi\/","og_site_name":"workboot","article_modified_time":"2025-07-17T07:20:38+00:00","twitter_misc":{"Dur\u00e9e de lecture estim\u00e9e":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/workboot.fr\/ciela\/atoi\/","url":"https:\/\/workboot.fr\/ciela\/atoi\/","name":"atoi() - workboot","isPartOf":{"@id":"https:\/\/workboot.fr\/ciela\/#website"},"datePublished":"2025-07-17T07:06:12+00:00","dateModified":"2025-07-17T07:20:38+00:00","inLanguage":"fr-FR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/workboot.fr\/ciela\/atoi\/"]}]},{"@type":"WebSite","@id":"https:\/\/workboot.fr\/ciela\/#website","url":"https:\/\/workboot.fr\/ciela\/","name":"workboot","description":"Open Source, Open Minds ","publisher":{"@id":"https:\/\/workboot.fr\/ciela\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/workboot.fr\/ciela\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"fr-FR"},{"@type":"Organization","@id":"https:\/\/workboot.fr\/ciela\/#organization","name":"workboot","url":"https:\/\/workboot.fr\/ciela\/","logo":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/workboot.fr\/ciela\/#\/schema\/logo\/image\/","url":"https:\/\/workboot.fr\/ciela\/wp-content\/uploads\/2025\/05\/logo_ciel-dorian-1.png","contentUrl":"https:\/\/workboot.fr\/ciela\/wp-content\/uploads\/2025\/05\/logo_ciel-dorian-1.png","width":1024,"height":950,"caption":"workboot"},"image":{"@id":"https:\/\/workboot.fr\/ciela\/#\/schema\/logo\/image\/"}}]}},"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"admin","author_link":"https:\/\/workboot.fr\/ciela\/author\/admin\/"},"uagb_comment_info":0,"uagb_excerpt":"lire a to i , ascii vers integer ! Pour l&rsquo;utiliser , il faut inclure la librairie stdlib.h transforme une cha\u00eene de caract\u00e8res en entier, si la cha\u00eene contient \u00ab\u00a01234\u00a0\u00bb [&hellip;]","_links":{"self":[{"href":"https:\/\/workboot.fr\/ciela\/wp-json\/wp\/v2\/pages\/2475","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/workboot.fr\/ciela\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/workboot.fr\/ciela\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/workboot.fr\/ciela\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/workboot.fr\/ciela\/wp-json\/wp\/v2\/comments?post=2475"}],"version-history":[{"count":5,"href":"https:\/\/workboot.fr\/ciela\/wp-json\/wp\/v2\/pages\/2475\/revisions"}],"predecessor-version":[{"id":2484,"href":"https:\/\/workboot.fr\/ciela\/wp-json\/wp\/v2\/pages\/2475\/revisions\/2484"}],"wp:attachment":[{"href":"https:\/\/workboot.fr\/ciela\/wp-json\/wp\/v2\/media?parent=2475"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}