Regarding mcq problem

#include
using namespace std;
int main() {
int a=10, *j; void *k; j=k=&a; j++;
k++; cout<<j<<k; return 0;
}

this is the code i’m still confused why it is saying that the code will not work??

Its b’coz the void is assigned to an integer pointer without a cast.j=k=&a;
Also you can’t increment void pointers but since you arenot using the incremented value so it works fine in this case.