Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com

Pointers Output

Easy
0/10

Problem statement

Figure out the correct output of the following code.

void changeSign(int *p){
  *p = (*p)  *  -1;
}

int main(){
  int a = 10;
  changeSign(&a);
  cout << a << endl;
}
Pointers Output
Options: One or more answers may be correct