What will be the value of i and j in the following code segment-03193
What will be the value of i and j in the following code segment?<br>int i, j ;<br>int x[5] = {2, 3, 4, 8, 9} ;<br>int *ptr =&x[2];<br>i = (*ptr)++ ;<br>j = *ptr++ ;<br>
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.10.
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++ ;
int i, j ;
int x[5] = {2, 3, 4, 8, 9} ;
int *ptr =&x[2];
i = (*ptr)++ ;
j = *ptr++ ;
i = 5, j = 5
i = 5, j = 8
i = 4, j = 8
i = 5, j = 9