Wait, did we forget to free the memory we allocated? I hope the examiner doesn't deduct points for that. Memory leaks are the bane of every programmer's existence.
Wow, this is a classic pointer question! I remember struggling with these in my exam. Good thing I brushed up on my dynamic memory allocation before taking this test.
User 2: That's correct! The code allocates memory for an array of 2 integers and assigns values 0 and 1 to the elements. Then it prints the value at index 1, which is 1.
The correct answer is B) It prints: 1. The code dynamically allocates an array of two integers and initializes them with 0 and 1 respectively. Then it prints the value at index 1, which is 1.
Georgene
4 months agoHelga
2 months agoLeigha
2 months agoKristian
3 months agoGrover
4 months agoFrancene
4 months agoRemedios
4 months agoTomas
2 months agoJanessa
2 months agoStanton
3 months agoTamekia
4 months agoSerina
4 months agoBerry
3 months agoSalome
3 months agoYolando
4 months agoSharika
4 months agoAdelina
5 months ago