{"id":218604,"date":"2024-10-02T00:10:31","date_gmt":"2024-10-02T00:10:31","guid":{"rendered":"https:\/\/namso-gen.co\/blog\/what-value-does-strcmp-return\/"},"modified":"2024-10-02T00:10:31","modified_gmt":"2024-10-02T00:10:31","slug":"what-value-does-strcmp-return","status":"publish","type":"post","link":"https:\/\/namso-gen.co\/blog\/what-value-does-strcmp-return\/","title":{"rendered":"What value does strcmp return?"},"content":{"rendered":"<p>When comparing two strings in C, the standard library function `strcmp()` is often used. The primary purpose of this function is to determine whether the two strings are equal or if one string comes before or after the other in lexicographical order. The return value of `strcmp()` holds vital information about the relationship between the two strings being compared.<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_62 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title \" >Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/namso-gen.co\/blog\/what-value-does-strcmp-return\/#The_return_value\" title=\"The return value:\">The return value:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/namso-gen.co\/blog\/what-value-does-strcmp-return\/#Frequently_Asked_Questions\" title=\"Frequently Asked Questions:\">Frequently Asked Questions:<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/namso-gen.co\/blog\/what-value-does-strcmp-return\/#1_What_does_lexicographical_order_mean\" title=\"1. What does lexicographical order mean?\">1. What does lexicographical order mean?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/namso-gen.co\/blog\/what-value-does-strcmp-return\/#2_Does_strcmp_perform_a_case-sensitive_comparison\" title=\"2. Does `strcmp()` perform a case-sensitive comparison?\">2. Does `strcmp()` perform a case-sensitive comparison?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/namso-gen.co\/blog\/what-value-does-strcmp-return\/#3_Can_we_compare_non-null-terminated_strings_using_strcmp\" title=\"3. Can we compare non-null-terminated strings using `strcmp()`?\">3. Can we compare non-null-terminated strings using `strcmp()`?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/namso-gen.co\/blog\/what-value-does-strcmp-return\/#4_How_can_I_compare_strings_without_considering_case\" title=\"4. How can I compare strings without considering case?\">4. How can I compare strings without considering case?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/namso-gen.co\/blog\/what-value-does-strcmp-return\/#5_What_if_one_string_is_shorter_than_the_other_in_strcmp\" title=\"5. What if one string is shorter than the other in `strcmp()`?\">5. What if one string is shorter than the other in `strcmp()`?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/namso-gen.co\/blog\/what-value-does-strcmp-return\/#6_Is_strcmp_affected_by_the_locale\" title=\"6. Is `strcmp()` affected by the locale?\">6. Is `strcmp()` affected by the locale?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/namso-gen.co\/blog\/what-value-does-strcmp-return\/#7_Are_there_any_alternatives_to_strcmp_for_string_comparison\" title=\"7. Are there any alternatives to `strcmp()` for string comparison?\">7. Are there any alternatives to `strcmp()` for string comparison?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/namso-gen.co\/blog\/what-value-does-strcmp-return\/#8_How_does_strcmp_differ_from_memcmp\" title=\"8. How does `strcmp()` differ from `memcmp()`?\">8. How does `strcmp()` differ from `memcmp()`?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/namso-gen.co\/blog\/what-value-does-strcmp-return\/#9_What_happens_if_I_pass_a_NULL_pointer_as_an_argument_to_strcmp\" title=\"9. What happens if I pass a NULL pointer as an argument to `strcmp()`?\">9. What happens if I pass a NULL pointer as an argument to `strcmp()`?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/namso-gen.co\/blog\/what-value-does-strcmp-return\/#10_How_can_I_check_if_two_strings_are_not_equal_using_strcmp\" title=\"10. How can I check if two strings are not equal using `strcmp()`?\">10. How can I check if two strings are not equal using `strcmp()`?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/namso-gen.co\/blog\/what-value-does-strcmp-return\/#11_Can_strcmp_be_used_for_anything_other_than_string_comparison\" title=\"11. Can `strcmp()` be used for anything other than string comparison?\">11. Can `strcmp()` be used for anything other than string comparison?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/namso-gen.co\/blog\/what-value-does-strcmp-return\/#12_Are_there_any_security_concerns_when_using_strcmp\" title=\"12. Are there any security concerns when using `strcmp()`?\">12. Are there any security concerns when using `strcmp()`?<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"The_return_value\"><\/span>The return value:<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\nThe return value of `strcmp()` is an integer, indicating the result of the comparison. It can have three possible values, which convey different meanings:<\/p>\n<p>1. <b>0:<\/b> When `strcmp()` returns 0, it means that both strings are identical. Every character in both strings matches exactly, including the null character &#8216;\u0000&#8217; that marks the end of the strings.<br \/>\n2. <b>Positive integer:<\/b> If the return value is positive, it signifies that the first character that doesn&#8217;t match in the two strings has a higher ASCII value in the first string than in the second. In simple terms, the first string comes lexicographically after the second.<br \/>\n3. <b>Negative integer:<\/b> Conversely, if the return value is negative, it signifies that the first character that doesn&#8217;t match has a lower ASCII value in the first string than in the second. This means that the first string comes lexicographically before the second.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Frequently_Asked_Questions\"><\/span>Frequently Asked Questions:<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"1_What_does_lexicographical_order_mean\"><\/span>1. What does lexicographical order mean?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nLexicographical order refers to the way in which strings are sorted alphabetically, comparing characters from left to right.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"2_Does_strcmp_perform_a_case-sensitive_comparison\"><\/span>2. Does `strcmp()` perform a case-sensitive comparison?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nYes, `strcmp()` is case-sensitive. Uppercase and lowercase characters are treated as distinct.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"3_Can_we_compare_non-null-terminated_strings_using_strcmp\"><\/span>3. Can we compare non-null-terminated strings using `strcmp()`?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nNo, `strcmp()` requires both strings to be null-terminated for proper comparison, as it relies on the presence of the null character to determine the end of a string.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"4_How_can_I_compare_strings_without_considering_case\"><\/span>4. How can I compare strings without considering case?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nTo compare strings without considering case, you can use the case-insensitive variant of `strcmp()` called `strcasecmp()`.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"5_What_if_one_string_is_shorter_than_the_other_in_strcmp\"><\/span>5. What if one string is shorter than the other in `strcmp()`?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nIf one string is shorter than the other, `strcmp()` only compares up to the length of the shorter string. It does not matter if the longer string has different characters beyond the shorter string&#8217;s length.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"6_Is_strcmp_affected_by_the_locale\"><\/span>6. Is `strcmp()` affected by the locale?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nYes, `strcmp()` is affected by the locale set in the program. Different locales may have different rules for the ordering of certain characters, which can impact the result of the comparison.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"7_Are_there_any_alternatives_to_strcmp_for_string_comparison\"><\/span>7. Are there any alternatives to `strcmp()` for string comparison?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nYes, in addition to `strcmp()`, the C standard library provides `strncmp()` which allows you to specify the maximum number of characters to compare from the strings.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"8_How_does_strcmp_differ_from_memcmp\"><\/span>8. How does `strcmp()` differ from `memcmp()`?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nWhile `strcmp()` is used for comparing strings, `memcmp()` is used for comparing any blocks of memory. `strcmp()` specifically compares strings up to the null character, while `memcmp()` compares a given number of bytes.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"9_What_happens_if_I_pass_a_NULL_pointer_as_an_argument_to_strcmp\"><\/span>9. What happens if I pass a NULL pointer as an argument to `strcmp()`?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nPassing a NULL pointer to `strcmp()` will result in undefined behavior. It is important to ensure that both arguments are valid and properly null-terminated strings.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"10_How_can_I_check_if_two_strings_are_not_equal_using_strcmp\"><\/span>10. How can I check if two strings are not equal using `strcmp()`?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nBy checking if the return value of `strcmp()` is nonzero, you can determine if the strings are not equal.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"11_Can_strcmp_be_used_for_anything_other_than_string_comparison\"><\/span>11. Can `strcmp()` be used for anything other than string comparison?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nWhile `strcmp()` is primarily used for string comparison, it can also be used to compare any sequence of characters as long as they are null-terminated.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"12_Are_there_any_security_concerns_when_using_strcmp\"><\/span>12. Are there any security concerns when using `strcmp()`?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nYes, when comparing sensitive information such as passwords, it is important to be cautious. `strcmp()` may be vulnerable to timing attacks, where attackers can exploit the time taken by `strcmp()` to guess characters in the string being compared. To mitigate this, specialized string comparison functions that are not vulnerable to timing attacks are recommended, such as `constant_time_compare()` provided by some cryptographic libraries.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When comparing two strings in C, the standard library function `strcmp()` is often used. The primary purpose of this function is to determine whether the two strings are equal or if one string comes before or after the other in lexicographical order. The return value of `strcmp()` holds vital information about the relationship between the &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"What value does strcmp return?\" class=\"read-more button\" href=\"https:\/\/namso-gen.co\/blog\/what-value-does-strcmp-return\/#more-218604\">Read more<span class=\"screen-reader-text\">What value does strcmp return?<\/span><\/a><\/p>\n","protected":false},"author":55,"featured_media":107420,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[86279],"tags":[],"class_list":["post-218604","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-learn","no-featured-image-padding"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>What value does strcmp return?<\/title>\n<meta name=\"description\" content=\"When comparing two strings in C, the standard library function `strcmp()` is often used. The primary purpose of this function is to determine whether the\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/namso-gen.co\/blog\/what-value-does-strcmp-return\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What value does strcmp return?\" \/>\n<meta property=\"og:description\" content=\"When comparing two strings in C, the standard library function `strcmp()` is often used. The primary purpose of this function is to determine whether the\" \/>\n<meta property=\"og:url\" content=\"https:\/\/namso-gen.co\/blog\/what-value-does-strcmp-return\/\" \/>\n<meta property=\"og:site_name\" content=\"Namso Gen Blog - Free Credit Card Generator [100% Valid]\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/synchronyfinancial\" \/>\n<meta property=\"article:published_time\" content=\"2024-10-02T00:10:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/namso-gen.co\/blog\/wp-content\/uploads\/2024\/03\/faq.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Darla Clarke\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@synchrony\" \/>\n<meta name=\"twitter:site\" content=\"@synchrony\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Darla Clarke\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/namso-gen.co\/blog\/what-value-does-strcmp-return\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/namso-gen.co\/blog\/what-value-does-strcmp-return\/\"},\"author\":{\"name\":\"Darla Clarke\",\"@id\":\"https:\/\/namso-gen.co\/blog\/#\/schema\/person\/8fb46297981687fe77339d265491391e\"},\"headline\":\"What value does strcmp return?\",\"datePublished\":\"2024-10-02T00:10:31+00:00\",\"dateModified\":\"2024-10-02T00:10:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/namso-gen.co\/blog\/what-value-does-strcmp-return\/\"},\"wordCount\":643,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/namso-gen.co\/blog\/#organization\"},\"articleSection\":[\"Learn\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/namso-gen.co\/blog\/what-value-does-strcmp-return\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/namso-gen.co\/blog\/what-value-does-strcmp-return\/\",\"url\":\"https:\/\/namso-gen.co\/blog\/what-value-does-strcmp-return\/\",\"name\":\"What value does strcmp return?\",\"isPartOf\":{\"@id\":\"https:\/\/namso-gen.co\/blog\/#website\"},\"datePublished\":\"2024-10-02T00:10:31+00:00\",\"dateModified\":\"2024-10-02T00:10:31+00:00\",\"description\":\"When comparing two strings in C, the standard library function `strcmp()` is often used. The primary purpose of this function is to determine whether the\",\"breadcrumb\":{\"@id\":\"https:\/\/namso-gen.co\/blog\/what-value-does-strcmp-return\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/namso-gen.co\/blog\/what-value-does-strcmp-return\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/namso-gen.co\/blog\/what-value-does-strcmp-return\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/namso-gen.co\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"What value does strcmp return?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/namso-gen.co\/blog\/#website\",\"url\":\"https:\/\/namso-gen.co\/blog\/\",\"name\":\"Namso Gen Blog - Free Credit Card Generator [100% Valid]\",\"description\":\"In Namso gen blog you can get many tips regarding to Credit cards, VCC, Credit card security etc. You can generate credit cards by using Namso-gen.co\",\"publisher\":{\"@id\":\"https:\/\/namso-gen.co\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/namso-gen.co\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/namso-gen.co\/blog\/#organization\",\"name\":\"Namso Gen Blog - Free Credit Card Generator [100% Valid]\",\"url\":\"https:\/\/namso-gen.co\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/namso-gen.co\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/namso-gen.co\/blog\/wp-content\/uploads\/2020\/07\/namso-gen-logo.png\",\"contentUrl\":\"https:\/\/namso-gen.co\/blog\/wp-content\/uploads\/2020\/07\/namso-gen-logo.png\",\"width\":500,\"height\":164,\"caption\":\"Namso Gen Blog - Free Credit Card Generator [100% Valid]\"},\"image\":{\"@id\":\"https:\/\/namso-gen.co\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/synchronyfinancial\",\"https:\/\/twitter.com\/synchrony\",\"https:\/\/www.youtube.com\/synchronyfinancial\",\"https:\/\/www.instagram.com\/synchrony\",\"https:\/\/www.linkedin.com\/company\/synchrony-financial\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/namso-gen.co\/blog\/#\/schema\/person\/8fb46297981687fe77339d265491391e\",\"name\":\"Darla Clarke\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/namso-gen.co\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g\",\"caption\":\"Darla Clarke\"},\"description\":\"Guest author Darla Clarke has meticulously crafted and revised this article to the best of their knowledge and understanding. Readers are strongly advised to exercise caution, verify information independently, and rely on their own judgment when considering the information provided. Read more articles on Namso Gen here.\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What value does strcmp return?","description":"When comparing two strings in C, the standard library function `strcmp()` is often used. The primary purpose of this function is to determine whether the","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:\/\/namso-gen.co\/blog\/what-value-does-strcmp-return\/","og_locale":"en_US","og_type":"article","og_title":"What value does strcmp return?","og_description":"When comparing two strings in C, the standard library function `strcmp()` is often used. The primary purpose of this function is to determine whether the","og_url":"https:\/\/namso-gen.co\/blog\/what-value-does-strcmp-return\/","og_site_name":"Namso Gen Blog - Free Credit Card Generator [100% Valid]","article_publisher":"https:\/\/www.facebook.com\/synchronyfinancial","article_published_time":"2024-10-02T00:10:31+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/namso-gen.co\/blog\/wp-content\/uploads\/2024\/03\/faq.png","type":"image\/png"}],"author":"Darla Clarke","twitter_card":"summary_large_image","twitter_creator":"@synchrony","twitter_site":"@synchrony","twitter_misc":{"Written by":"Darla Clarke","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/namso-gen.co\/blog\/what-value-does-strcmp-return\/#article","isPartOf":{"@id":"https:\/\/namso-gen.co\/blog\/what-value-does-strcmp-return\/"},"author":{"name":"Darla Clarke","@id":"https:\/\/namso-gen.co\/blog\/#\/schema\/person\/8fb46297981687fe77339d265491391e"},"headline":"What value does strcmp return?","datePublished":"2024-10-02T00:10:31+00:00","dateModified":"2024-10-02T00:10:31+00:00","mainEntityOfPage":{"@id":"https:\/\/namso-gen.co\/blog\/what-value-does-strcmp-return\/"},"wordCount":643,"commentCount":0,"publisher":{"@id":"https:\/\/namso-gen.co\/blog\/#organization"},"articleSection":["Learn"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/namso-gen.co\/blog\/what-value-does-strcmp-return\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/namso-gen.co\/blog\/what-value-does-strcmp-return\/","url":"https:\/\/namso-gen.co\/blog\/what-value-does-strcmp-return\/","name":"What value does strcmp return?","isPartOf":{"@id":"https:\/\/namso-gen.co\/blog\/#website"},"datePublished":"2024-10-02T00:10:31+00:00","dateModified":"2024-10-02T00:10:31+00:00","description":"When comparing two strings in C, the standard library function `strcmp()` is often used. The primary purpose of this function is to determine whether the","breadcrumb":{"@id":"https:\/\/namso-gen.co\/blog\/what-value-does-strcmp-return\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/namso-gen.co\/blog\/what-value-does-strcmp-return\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/namso-gen.co\/blog\/what-value-does-strcmp-return\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/namso-gen.co\/blog\/"},{"@type":"ListItem","position":2,"name":"What value does strcmp return?"}]},{"@type":"WebSite","@id":"https:\/\/namso-gen.co\/blog\/#website","url":"https:\/\/namso-gen.co\/blog\/","name":"Namso Gen Blog - Free Credit Card Generator [100% Valid]","description":"In Namso gen blog you can get many tips regarding to Credit cards, VCC, Credit card security etc. You can generate credit cards by using Namso-gen.co","publisher":{"@id":"https:\/\/namso-gen.co\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/namso-gen.co\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/namso-gen.co\/blog\/#organization","name":"Namso Gen Blog - Free Credit Card Generator [100% Valid]","url":"https:\/\/namso-gen.co\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/namso-gen.co\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/namso-gen.co\/blog\/wp-content\/uploads\/2020\/07\/namso-gen-logo.png","contentUrl":"https:\/\/namso-gen.co\/blog\/wp-content\/uploads\/2020\/07\/namso-gen-logo.png","width":500,"height":164,"caption":"Namso Gen Blog - Free Credit Card Generator [100% Valid]"},"image":{"@id":"https:\/\/namso-gen.co\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/synchronyfinancial","https:\/\/twitter.com\/synchrony","https:\/\/www.youtube.com\/synchronyfinancial","https:\/\/www.instagram.com\/synchrony","https:\/\/www.linkedin.com\/company\/synchrony-financial"]},{"@type":"Person","@id":"https:\/\/namso-gen.co\/blog\/#\/schema\/person\/8fb46297981687fe77339d265491391e","name":"Darla Clarke","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/namso-gen.co\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","caption":"Darla Clarke"},"description":"Guest author Darla Clarke has meticulously crafted and revised this article to the best of their knowledge and understanding. Readers are strongly advised to exercise caution, verify information independently, and rely on their own judgment when considering the information provided. Read more articles on Namso Gen here."}]}},"_links":{"self":[{"href":"https:\/\/namso-gen.co\/blog\/wp-json\/wp\/v2\/posts\/218604","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/namso-gen.co\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/namso-gen.co\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/namso-gen.co\/blog\/wp-json\/wp\/v2\/users\/55"}],"replies":[{"embeddable":true,"href":"https:\/\/namso-gen.co\/blog\/wp-json\/wp\/v2\/comments?post=218604"}],"version-history":[{"count":0,"href":"https:\/\/namso-gen.co\/blog\/wp-json\/wp\/v2\/posts\/218604\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/namso-gen.co\/blog\/wp-json\/wp\/v2\/media\/107420"}],"wp:attachment":[{"href":"https:\/\/namso-gen.co\/blog\/wp-json\/wp\/v2\/media?parent=218604"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/namso-gen.co\/blog\/wp-json\/wp\/v2\/categories?post=218604"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/namso-gen.co\/blog\/wp-json\/wp\/v2\/tags?post=218604"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}