📚 Practice Mode

Security Vulnerabilities and Secure Coding

Learn at your own pace with hints and detailed explanations

1 / 20
Multiple Choice

In the following code snippet, how should a pointer be deleted int main (int argc, char argv[]) { char j=new char[100]; j=argv[1]; int k=atoi(j); /delete here/ return 0; }

  1. delete j
  2. free j
  3. it is not supposed to be deleted
  4. delete [] j