C++ Program To Check Even Or Odd Using Pointer

Problem:- Write A Program To Find A number Is Even Or Odd Using Pointer or c++ program to find even and odd numbers using function or c++ program to find odd or even using class or c++ program to find even and odd numbers using array or c program to print even numbers in an array or even odd program in c++ using an array or c++ odd or even loop or c++ program to check whether a number is even or odd using a function or c program to check whether a number is prime or not using the function or c program for even or odd using for loop

Check This:- Hacker rank solution for Strings, Classes, STL, Inheritance in C++.

Logic:- As we know that if the number is less than zero than a number is Negative or if a Number is Greater than Zero then the number is Positive or any case number is equal to zero. So in this problem we are comparing if the entered number by the user is less than zero or greater than zero or if the both condition fails than a number is definitely zero or we can say entered a number is zero.

Also Check:- Geeksforgeeks solution for School, Basic, Easy, Medium, Hard in C++.

Extreme Recommended:- If this post is beneficial for you and you want Updates for New post then please like our Facebook Page or Join our Facebook Group and Google plus Community for up-to-date for a new post or if you have any Query you can ask there with lots of coders also suggest to your Friends to join and like our page, so we can help our community, and don't forget to Subscribe. Enter your Email and click to subscribe.


using namespace std;
int main()
  int a;
  int *p1;
  cout<<"Enter The Number You Want to Check \n\n";
  cout<<"Number Is Possitive \n";
  else if(*p1<0)
  cout<<"Number Is Negative \n";
  cout<<"Number Is Equal to Zero\n\n";
  return 0;



C++ Program To Check Even Or Odd Using Pointer

You May Also Like

1. C++Program To Calculate Factorial Of A Given Number Using Loop

2. C++ Program To Print A Message Multiple Times Using Loop

Previous Post
Next Post

post written by:

Hi, I’m Ghanendra Yadav, SEO Expert, Professional Blogger, Programmer, and UI Developer. Get a Solution of More Than 500+ Programming Problems, and Practice All Programs in C, C++, and Java Languages. Get a Competitive Website Solution also Ie. Hackerrank Solutions and Geeksforgeeks Solutions. If You Are Interested to Learn a C Programming Language and You Don't Have Experience in Any Programming, You Should Start with a C Programming Language, Read: List of Format Specifiers in C.
Follow Me

1 comment: