---
title: "Discussion on \"Linear search algorithm\" | Hashnode"
description: "Discussion on \"Linear search algorithm\". code in c lang\n#include <stdio.h>\nint l_search(int a[], int n,int item)\n{\n    int loc=-1;\n    for (int i=0;i<n;i++)\n    {\n        if (a[i]==item)\n        {\n            return loc=i;\n        }\n    }\n    return loc;\n}\nint main() {\n  int res,item,n;\n  p..."
url: "https://hashnode.com/posts/linear-search-algorithm/64d085e9251062afecbc7d5b"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Linear search algorithm](https://kr-wiki.hashnode.dev/linear-search-algorithm?utm_source=hashnode&utm_medium=feed)

code in c lang #include <stdio.h> int l\_search(int a\[\], int n,int item) { int loc=-1; for (int i=0;i<n;i++) { if (a\[i\]==item) { return loc=i; } } return loc; } int main() { int res,item,n; p...

Aug 7, 2023 · 1 min read · kr-wiki.hashnode.dev  
Read the article

-   [#dsa](https://hashnode.com/tag/dsa)

## Written by

[Kumar](https://hashnode.com/@kumar944)

@kumar944 · india

  
[View profile](https://hashnode.com/@kumar944)

Web Developer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
