What is output?
#include <stdio.h>
void CheckValue(int* pointVar1, int* pointVar2)
{
if (pointVar1 == NULL && pointVar2 == NULL)
{
printf("Pointer is
null\n");
}
else if (*pointVar2 > *pointVar1) {
printf("%p\n",
*pointVar2);
}
else if (*pointVar1 > *pointVar2) {
printf("%p\n",
*pointVar1);
}
}
int main() {
int num1 = 5;
int num2 = 9;
CheckValue(&num1,
&num2);
return 0;
}
a. |
0 |
b. |
5 |
c. |
9 |
d. |
Pointer is null |
e. |
None of the previous |
Its prints the largest value among 5 and 9
So, output is 9
c. 9
Get Answers For Free
Most questions answered within 1 hours.