{"id":91,"date":"2025-02-05T11:14:12","date_gmt":"2025-02-05T11:14:12","guid":{"rendered":"https:\/\/alpeshconnect.in\/blog\/?p=91"},"modified":"2025-02-05T11:14:12","modified_gmt":"2025-02-05T11:14:12","slug":"find-no-from-array-in-c","status":"publish","type":"post","link":"https:\/\/alpeshconnect.in\/blog\/2025\/02\/05\/find-no-from-array-in-c\/","title":{"rendered":"Find No From Array in C"},"content":{"rendered":"\n<p>write a C program to accept 10 integers for 1D array and a number from input device. Check whether user inputted number present in the 1D array or not.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\"><\/h1>\n\n\n\n<p>#include&lt;stdio.h><\/p>\n\n\n\n<p>#include&lt;conio.h><\/p>\n\n\n\n<p>void main() <\/p>\n\n\n\n<p>{<br>int arr[10];<br>int num, i, found = 0;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ Accepting 10 integers for the array\nprintf(\"Enter 10 integers for the array:\\n\");\nfor (i = 0; i &lt; 10; i++) {\n    printf(\"Enter element %d: \", i + 1);\n    scanf(\"%d\", &amp;arr&#91;i]);\n}\n\n\/\/ Accepting the number to be searched\nprintf(\"\\nEnter a number to search in the array: \");\nscanf(\"%d\", &amp;num);\n\n\/\/ Checking if the number is present in the array\nfor (i = 0; i &lt; 10; i++) {\n    if (arr&#91;i] == num) {\n        found = 1;\n        break;\n    }\n}\n\n\/\/ Displaying the result\nif (found) {\n    printf(\"\\nThe number %d is present in the array.\\n\", num);\n} else {\n    printf(\"\\nThe number %d is not present in the array.\\n\", num);\n}\n\ngetch();<\/code><\/pre>\n\n\n\n<p>}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>write a C program to accept 10 integers for 1D array and a number from input device. Check whether user inputted number present in the 1D array or not. #include&lt;stdio.h> #include&lt;conio.h> void main() {int arr[10];int num, i, found = 0; }<\/p>\n","protected":false},"author":1,"featured_media":82,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,23],"tags":[27,25,26,24],"class_list":["post-91","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-bca","category-c-language","tag-array-in-c","tag-bca","tag-bca-paper-solution","tag-c-language"],"_links":{"self":[{"href":"https:\/\/alpeshconnect.in\/blog\/wp-json\/wp\/v2\/posts\/91","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alpeshconnect.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alpeshconnect.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alpeshconnect.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/alpeshconnect.in\/blog\/wp-json\/wp\/v2\/comments?post=91"}],"version-history":[{"count":1,"href":"https:\/\/alpeshconnect.in\/blog\/wp-json\/wp\/v2\/posts\/91\/revisions"}],"predecessor-version":[{"id":92,"href":"https:\/\/alpeshconnect.in\/blog\/wp-json\/wp\/v2\/posts\/91\/revisions\/92"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/alpeshconnect.in\/blog\/wp-json\/wp\/v2\/media\/82"}],"wp:attachment":[{"href":"https:\/\/alpeshconnect.in\/blog\/wp-json\/wp\/v2\/media?parent=91"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alpeshconnect.in\/blog\/wp-json\/wp\/v2\/categories?post=91"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alpeshconnect.in\/blog\/wp-json\/wp\/v2\/tags?post=91"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}