---
title: "Discussion on \"C++ program to check the element in the ARRAY\" | Hashnode"
description: "Discussion on \"C++ program to check the element in the ARRAY\". #include <iostream>\nusing namespace std;\n\nvoid findElement(int*p,int size1,int x1){\n    for (int i=0;i<size1;i++){\n        if (p[i]==x1){\n            cout<<\"Voilla!, We found it at index \"<<i<<endl;\n            return;\n        }\n    }\n    cout<<\"Sorr..."
url: "https://hashnode.com/posts/c-program-to-check-the-element-in-the-array/614216a1b95e345575e99e3a"
---

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

Discussion

# [C++ program to check the element in the ARRAY](https://vishektoor.hashnode.dev/c-program-to-check-the-element-in-the-array?utm_source=hashnode&utm_medium=feed)

#include <iostream> using namespace std; void findElement(int\*p,int size1,int x1){ for (int i=0;i<size1;i++){ if (p\[i\]==x1){ cout<<"Voilla!, We found it at index "<<i<<endl; return; } } cout<<"Sorr...

Sep 15, 2021 · 1 min read · vishektoor.hashnode.dev  
Read the article

-   [#cpp](https://hashnode.com/tag/cpp)
-   [#learning](https://hashnode.com/tag/learning)
-   [#data-structures](https://hashnode.com/tag/data-structures)
-   [#coding](https://hashnode.com/tag/coding)
-   [#c](https://hashnode.com/tag/c)

## Written by

[Vishek](https://hashnode.com/@vishektoor)

@vishektoor

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

tooring

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
