Hello friends!!!!!
Pgr to find the greatest value of two numbers using pointers
C LANGUAGE
9/16/20241 min read
#include<stdio.h>
int main() {
int a ;
printf("Enter the value of a : ");
scanf("%d", &a);
int b ;
printf("Enter the value of b : ");
scanf("%d", &b);
int *p = &a;
int *t = &b;
if (*p > *t) {
printf("%d", *p);
}
else {
printf("%d", *t);
}
}
Output :
Enter the value of a : 12
Enter the value of b : 34
34
=== Code Execution Successful ===