Update appNew update is available. Click here to update.
Topics

Pointers Output

Easy
0/10

Problem statement

What will be the output ?

void square(int *p){
 int a = 10;
 p = &a;
 *p = (*p) * (*p);
}

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