Multiple choice technology security

int main(int argc,char* argv[]) {
    int *ptr1=new int;
    if(ptr1==NULL)    exit(1);
    int *ptr2=new int;
    if(ptr2==NULL)    exit(1);
    char* j;
    j=argv[1];
    int k=atoi(j);
    if (j==0){
        Ptr1=&k;
        delete ptr2;  /*1*/
    }
    else {
        Ptr2=&k;
    }
    delete ptr1;  /*2*/  
    delete ptr2; /*3*/   
    return 0;
}

which line of the code should be deleted to remove vulnerability

  1. line 1 and line 3

  2. line 2 and line 3

  3. line 1

  4. line 3

Reveal answer Fill a bubble to check yourself
C Correct answer