Gate2017 ss Q34

  • Option : C
  • Explanation :
    void printxy (int x, int y) {
    int *ptr;
    x = 0; // x=0,y=1
    ptr = &x; // x=0,y=1, and ptr points to x
    y = * ptr; //x=0, y=0
    * ptr = 1; //x=1, y=0
    printf (“%d, %d,” x, y); // It prints 1 AND 0.
    }
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *