What will be the value of i and j in the following code segment-03106
What will be the value of i and j in the following code segment?int i, j ;int x[5] = {2, 3, 4, 8, 9} ;int *ptr =&x[2];i = (*ptr)++ ;j = *ptr++ ;
This multiple choice question (MCQ) is related to the book/course vu cs201 Introduction to Programming. It can also be found in vu cs201 Mid Term - Quiz No.1.
What will be the value of i and j in the following code segment?int i, j ;int x[5] = {2, 3, 4, 8, 9} ;int *ptr =&x[2];i = (*ptr)++ ;j = *ptr++ ;
i = 5, j = 8
i = 5, j = 5
i = 5, j = 9
i = 4, j = 8