What happens when the following program is validated? void main() { void ptr = (void) malloc(sizeof(void)); ptr++ ; }

  1. CompilationFails

  2. Will Throw RunTime Error But Code will get Compiled

  3. Throws Linker Error

  4. All the above statements are invalid


Correct Option: A

Find more quizzes: