{"id":20095143,"url":"https://github.com/patilyashh/largest-array","last_synced_at":"2026-06-04T13:31:08.907Z","repository":{"id":223020822,"uuid":"758994511","full_name":"PATILYASHH/largest-array","owner":"PATILYASHH","description":"Day 7 of 75 Days C programing challenge || #7 ||","archived":false,"fork":false,"pushed_at":"2024-02-17T17:22:09.000Z","size":80,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-13T03:33:19.592Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PATILYASHH.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-02-17T17:15:22.000Z","updated_at":"2024-09-24T04:15:38.000Z","dependencies_parsed_at":"2024-02-17T18:30:07.591Z","dependency_job_id":"a1bcc34b-9494-4153-971e-1195195fcaaf","html_url":"https://github.com/PATILYASHH/largest-array","commit_stats":null,"previous_names":["patilyashh/largest-array"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PATILYASHH%2Flargest-array","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PATILYASHH%2Flargest-array/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PATILYASHH%2Flargest-array/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PATILYASHH%2Flargest-array/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PATILYASHH","download_url":"https://codeload.github.com/PATILYASHH/largest-array/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241534511,"owners_count":19977991,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T16:54:13.872Z","updated_at":"2026-06-04T13:31:08.898Z","avatar_url":"https://github.com/PATILYASHH.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Finding the Largest Element in an Array\n\nThis C program demonstrates how to find the largest element in an array using a simple linear search algorithm.\n\n## Prerequisites\n\nMake sure you have a C compiler installed on your system. If not, you can download and install one before compiling and running the program.\n\n## How to Compile and Run\n\n1. Open a terminal or command prompt.\n2. Navigate to the directory containing the `largest_element.c` file.\n3. Compile the program using a C compiler. For example, using GCC:\n   ```bash\n   gcc largest_element.c -o largest_element\n \n1. Run the compiled program:\n ```\n./largest_element\n ```\n## Program Explanation\n\n- The program starts by initializing an integer array `arr[]` with some numbers.\n- It calculates the number of elements in the array `n` using the formula `sizeof(arr) / sizeof(arr[0])`.\n- A variable `max` is initialized with the value of the first element of the array (`arr[0]`).\n- The program then iterates through the array from the second element (`i = 1`) to find the largest element.\n- During each iteration, it checks if the current element is greater than the current maximum value `max`.\n- If an element is found to be greater than `max`, `max` is updated with the value of that element.\n- Once the loop completes, the program prints the maximum value found in the array using `printf()`.\n\n## Example Output\n\nThe largest element in the array is: 20\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatilyashh%2Flargest-array","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatilyashh%2Flargest-array","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatilyashh%2Flargest-array/lists"}