What will be the final value of num1 and num2?
		
					

Loading

โœช Choose the correct option.

What will be the final value of num1 and num2?


#include
int main()
{
long num1 = 0;
long num2 = 0;
long *pnum = NULL;
pnum = &num1;
*pnum = 2;
++num2;
num2 += *pnum;
pnum = &num2;
++*pnum;
return 0;
}

A. num1 = 2
num2 = 4
B. num1 = 4
num2 = 2
C. Compilaton Error
D. num1 = 4
num2 = 4

Leave a Comment