{"id":4107,"date":"2024-04-27T04:24:36","date_gmt":"2024-04-26T22:54:36","guid":{"rendered":"https:\/\/cthecosmos.com\/?p=4107"},"modified":"2024-04-27T04:24:36","modified_gmt":"2024-04-26T22:54:36","slug":"%f0%9d%92%86%f0%9d%92%93%f0%9d%92%93%f0%9d%92%90%f0%9d%92%93%f0%9d%92%94","status":"publish","type":"post","link":"https:\/\/cthecosmos.com\/?p=4107","title":{"rendered":"\ud835\udc86\ud835\udc93\ud835\udc93\ud835\udc90\ud835\udc93\ud835\udc94"},"content":{"rendered":"\n<p class=\"has-black-color has-white-background-color has-text-color has-background has-link-color wp-elements-0e524980e66e6bc6823246b19b23dc75\" style=\"font-size:17px;line-height:1.8\">\ud835\udc7e\ud835\udc89\ud835\udc9a \ud835\udc85\ud835\udc8a\ud835\udc85 \ud835\udc95\ud835\udc89\ud835\udc86 \ud835\udc85\ud835\udc86\ud835\udc97\ud835\udc86\ud835\udc8d\ud835\udc90\ud835\udc91\ud835\udc86\ud835\udc93 \ud835\udc83\ud835\udc86\ud835\udc84\ud835\udc90\ud835\udc8e\ud835\udc86 \ud835\udc82 \ud835\udc9b\ud835\udc90\ud835\udc8e\ud835\udc83\ud835\udc8a\ud835\udc86? \ud835\udc69\ud835\udc86\ud835\udc84\ud835\udc82\ud835\udc96\ud835\udc94\ud835\udc86 \ud835\udc89\ud835\udc8a\ud835\udc94 \ud835\udc84\ud835\udc90\ud835\udc85\ud835\udc86 \ud835\udc8c\ud835\udc86\ud835\udc91\ud835\udc95 \ud835\udc84\ud835\udc90\ud835\udc8e\ud835\udc8a\ud835\udc8f\ud835\udc88 \ud835\udc83\ud835\udc82\ud835\udc84\ud835\udc8c \ud835\udc98\ud835\udc8a\ud835\udc95\ud835\udc89 &#8216;\ud835\udc96\ud835\udc8f\ud835\udc85\ud835\udc86\ud835\udc82\ud835\udc85 \ud835\udc86\ud835\udc93\ud835\udc93\ud835\udc90\ud835\udc93\ud835\udc94&#8217;!<br><br>Debugging is a challenging task while programming practice. We do face many unknown warnings and errors during our programming journey. Here is a list of few common errors that would occur during the compilation of our code.<br><br>Do comment down a challenging situation you faced while debugging an error.\u00a0One that took 10 hours to debug but was solved with just a &#8220;<strong><em>;<\/em><\/strong>&#8221; .<br><br><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1000\" height=\"480\" data-attachment-id=\"4114\" data-permalink=\"https:\/\/cthecosmos.com\/?attachment_id=4114\" data-orig-file=\"https:\/\/i0.wp.com\/cthecosmos.com\/wp-content\/uploads\/2024\/04\/ponerr1-1.png?fit=8084%2C3880&amp;ssl=1\" data-orig-size=\"8084,3880\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"ponerr1-1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/cthecosmos.com\/wp-content\/uploads\/2024\/04\/ponerr1-1.png?fit=1000%2C480&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/cthecosmos.com\/wp-content\/uploads\/2024\/04\/ponerr1-1.png?resize=1000%2C480&#038;ssl=1\" alt=\"\" class=\"wp-image-4114\" \/><\/figure>\n\n\n\n<p class=\"has-black-color has-white-background-color has-text-color has-background has-link-color wp-elements-d47bbe7596ceda04e6a9f9d20b4e9132\" style=\"font-size:17px;line-height:1.8\"><br><strong>Syntax Errors:<\/strong><br><br><strong><em>&#8220;expected &#8216;;&#8217;, &#8216;,&#8217; or &#8216;)&#8217; before &#8230;&#8221;<\/em><\/strong>: Missing punctuation or incorrect syntax in the code.<br><strong><em>&#8220;expected expression before &#8230;&#8221;:<\/em><\/strong> Missing an expression where it&#8217;s expected, like in a statement or condition.<br><strong><em>&#8220;invalid type argument of &#8216;-&gt;&#8217; (have &#8216;struct &#8230;&#8217;)&#8221;<\/em><\/strong>: Trying to use &#8216;-&gt;&#8217; on a non-pointer type.<br><strong><em>&#8220;expected declaration specifiers or &#8216;&#8230;&#8217; before &#8230;&#8221;<\/em><\/strong>: Missing type or specifier before an identifier.<br><br><strong>Semantic Errors:<\/strong><br><br><strong><em>&#8220;undefined reference to &#8230;&#8221;<\/em><\/strong>: Function or variable declared but not defined.<br><strong><em>&#8220;incompatible types for assignment&#8221;<\/em><\/strong>: Assigning values of incompatible types.<br><strong><em>&#8220;lvalue required as left operand of assignment&#8221;<\/em><\/strong>: Trying to assign a value to a non-variable.<br><strong><em>&#8220;expression has no effect&#8221;<\/em><\/strong>: Expression doesn&#8217;t affect the program&#8217;s behavior.<br><strong><em>&#8220;too few arguments to function &#8230;&#8221;<\/em><\/strong>: Function call with fewer arguments than needed.<br><strong><em>&#8220;subscripted value is neither array nor pointer nor vector&#8221;<\/em><\/strong>: Using &#8216;[]&#8217; on a non-array, non-pointer.<br><br><strong>Linking Errors:<\/strong><br><br><strong><em>&#8220;undefined reference to &#8216;main'&#8221;<\/em><\/strong>: Missing `main` function (entry point).<br><strong><em>&#8220;undefined reference to &#8216;&#8230;'&#8221;<\/em><\/strong>: Function or variable not defined but referenced.<br><br><strong>Type and Conversion Errors:<\/strong><br><br><strong><em>&#8220;incompatible types in assignment&#8221;<\/em><\/strong>: Assigning values of different types.<br><strong><em>&#8220;void value not ignored as it ought to be&#8221;<\/em><\/strong>: Using a void function&#8217;s return value.<br><strong><em>&#8220;request for member &#8216;&#8230;&#8217; in something not a structure or union&#8221;<\/em><\/strong>: Trying to access a member of a non-struct\/union.<br><br><strong>Memory and Pointer Errors:<\/strong><br><br><strong><em>&#8220;dereferencing pointer to incomplete type&#8221;<\/em><\/strong>: Using a pointer to an incomplete type.<br><strong><em>&#8220;invalid use of undefined type &#8216;struct &#8230;'&#8221;<\/em><\/strong>: Using a struct\/union member without defining the struct\/union.<br><strong><em>&#8220;lvalue required as unary &#8216;&amp;&#8217; operand&#8221;<\/em><\/strong>: Missing variable for `&amp;` operator.<br><strong><em>&#8220;invalid type argument of unary &#8216;*&#8217; (have &#8216;int&#8217;)&#8221;:<\/em><\/strong> Applying `*` to a non-pointer type.<br><strong><em>&#8220;void function &#8216;&#8230;&#8217; should not return a value&#8221;<\/em><\/strong>: Void function returning a value.<br><strong><em>&#8220;free(): invalid next size (fast)&#8221;<\/em><\/strong>: Invalid memory management (e.g., double-free).<br><br><strong>File and I\/O Errors:<\/strong><br><br><strong><em>&#8220;&#8216;&#8230;&#8217; undeclared (first use in this function)&#8221;<\/em><\/strong>: Using a variable without declaring it.<br><strong><em>&#8220;too many arguments to function &#8230;&#8221;:<\/em><\/strong> Function call with more arguments than expected.<br><strong><em>&#8220;&#8216;&#8230;&#8217; has no member named &#8216;&#8230;'&#8221;<\/em><\/strong>: Using a member that doesn&#8217;t exist in a struct\/union.<br><strong><em>&#8220;expected &#8216;)&#8217; before &#8216;&#8230;&#8217; token&#8221;<\/em><\/strong>: Missing closing parenthesis.<br><br><strong>Preprocessor Errors:<\/strong><br><br><strong><em>&#8220;&#8216;&#8230;&#8217; was not declared in this scope&#8221;<\/em><\/strong>: Using a macro or variable not defined in the scope.<br><strong><em>&#8220;unterminated &#8216;if&#8217; directive&#8221;<\/em><\/strong>: Unclosed `#if` or `#ifdef` directive.<br>&#8220;#include&#8217; expects &#8216;&#8230;&#8217; or &lt;&#8230;&gt;&#8221;: Incorrect format for include statement.<br><br><strong>Miscellaneous Errors:<\/strong><br><br><strong><em>&#8220;division by zero<\/em><\/strong>&#8220;: Attempting to divide by zero.<br><strong><em>&#8220;control reaches end of non-void function&#8221;<\/em><\/strong>: Function missing return in all paths.<br><strong><em>&#8220;label &#8216;&#8230;&#8217; used but not defined&#8221;<\/em><\/strong>: Using a label that&#8217;s not defined.<br><strong><em>&#8220;case label does not reduce to an integer constant&#8221;<\/em><\/strong>: Switch case label not a constant.<br><strong><em>&#8220;invalid digit &#8216;&#8230;&#8217; in octal constant&#8221;<\/em><\/strong>: Using invalid digit in octal constant.<br>&#8220;declaration does not declare anything&#8221;: Empty declaration statement.<br><br><br><br>LinkedIn Post: <a href=\"https:\/\/www.linkedin.com\/posts\/t-yashwanth-naidu_earlycareerembedded-earlycareer-embeddedsystems-activity-7102816742590095360-9mbj\/?utm_source=share&amp;utm_medium=member_desktop\">https:\/\/www.linkedin.com\/posts\/t-yashwanth-naidu_earlycareerembedded-earlycareer-embeddedsystems-activity-7102816742590095360-9mbj\/?utm_source=share&amp;utm_medium=member_desktop<\/a><\/p>\n\n\n\n<p class=\"has-white-color has-text-color has-background has-link-color has-medium-font-size wp-elements-486e7799b35920eece0029316d5e98bd\" style=\"background:linear-gradient(135deg,rgb(35,23,11) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)\">~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br><strong>An Article by: <\/strong>Yashwanth Naidu Tikkisetty<br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Debugging in programming can be challenging due to syntax, semantic, linking, type, memory, file, preprocessor, and miscellaneous errors. Common errors include missing punctuation, undefined variables, incompatible types, and memory management issues. These challenges can take hours to resolve but are often solved with simple corrections. (Word count: 49)<\/p>\n<a href=\"https:\/\/cthecosmos.com\/?p=4107\" class=\"more-link\">Read More <span class=\"screen-reader-text\">\ud835\udc86\ud835\udc93\ud835\udc93\ud835\udc90\ud835\udc93\ud835\udc94<\/span><\/a>","protected":false},"author":120055267,"featured_media":4109,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":false,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_wpas_customize_per_network":false},"categories":[36985,28627,30181],"tags":[772321195,772321193,9553,14306307,1354040],"class_list":{"0":"post-4107","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","6":"hentry","7":"category-c-programming","8":"category-embedded","9":"category-embedded-systems","10":"tag-c-programming","11":"tag-embedded-systems","12":"tag-errors","13":"tag-programming-errors","14":"tag-short-article","16":"fallback-thumbnail"},"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/cthecosmos.com\/wp-content\/uploads\/2024\/04\/ponerr1.png?fit=8084%2C3880&ssl=1","jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8CiEf-14f","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/cthecosmos.com\/index.php?rest_route=\/wp\/v2\/posts\/4107","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cthecosmos.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cthecosmos.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cthecosmos.com\/index.php?rest_route=\/wp\/v2\/users\/120055267"}],"replies":[{"embeddable":true,"href":"https:\/\/cthecosmos.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4107"}],"version-history":[{"count":6,"href":"https:\/\/cthecosmos.com\/index.php?rest_route=\/wp\/v2\/posts\/4107\/revisions"}],"predecessor-version":[{"id":4115,"href":"https:\/\/cthecosmos.com\/index.php?rest_route=\/wp\/v2\/posts\/4107\/revisions\/4115"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cthecosmos.com\/index.php?rest_route=\/wp\/v2\/media\/4109"}],"wp:attachment":[{"href":"https:\/\/cthecosmos.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4107"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cthecosmos.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4107"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cthecosmos.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4107"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}