Security Vulnerabilities and Secure Coding

Casual Mode - Take your time!

1 / 20
Correct
0
Incorrect
0
Score
0%
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
Change Mode