InterviewSolution
Saved Bookmarks
| 1. |
What is the function of the given longjump(jmp_buf buf, i)?(a) go back to place buf is pointing to and return i(b) go back to place buf is pointing to and return 0(c) uses buf to remember current position and returns 0(d) uses buf to remember current position and returns iI have been asked this question in an interview for internship.I'd like to ask this question from Non-Local Jumps in portion C Library of C |
|
Answer» RIGHT answer is (a) go back to PLACE buf is pointing to and RETURN i Explanation: In the given function longjmp(jmp_buf buf,i), it goes back to place buf is pointing to and return i.setjmp(jmp_bufbuf) uses buf to remember current position to and return 0. |
|