C Introduction
Control Statement
- Program to find largest number among n numbers
- Program to print multiplication table
- An effective way to use of Else If
- Program to check vowel or not
- Program to find factorial of number
- Program to find the Fibonacci Series
- Program to check Palindrome or not
- Program to find sum of digits
- Program to Reverse a String
Functions
Array
Pointers
Structure and Union
No Examples found for this topic - CodeHelpPro
Data Files
No Examples found for this topic - CodeHelpPro
Pointer Comparison in C
In this example, We will learn a simple program for pointer comparision. Before that, You must have knowledge of the following topics.
CODE
#include <stdio.h>
int main()
{
int *ptrA,*ptrB;
ptrA = (int *)1;
ptrB = (int *)2;
if(ptrA > ptrB)
printf("PtrB is greater than ptrA");
else
printf("PtrB is less than ptrA");
return(0);
}
The output of above program is
PtrB is less than ptrA
Subscribe
Login
0 Comments
Inline Feedbacks
View all comments