[EXPLAINATION] C PROGRAM | SoloLearn: Learn to code for FREE!

+27

[EXPLAINATION] C PROGRAM

1.https://code.sololearn.com/c4CfxGxdAG98/?ref=app 2.please explain this code how did this output will comes... Output :- 6 3 2 6

11/12/2020 1:34:14 PM

***

2 Answers

New Answer

+7

p is a pointer variable, holds address of b. q is a pointer variable, holds address of a. *p -> value at address pointed by p. *q -> value at address pointed by q. So *p = 5 and *q = 3 c = *p % *q which is 5%3 = 2 ++(*p) increments the value of b So b is 6 and *p also prints 6

+8

Avinesh Thank you for explaining