Suppose a local variable int my_int is declared in a function named func0. Which of the following is considered safe in
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Suppose a local variable int my_int is declared in a function named func0. Which of the following is considered safe in
Suppose a local variable int my_int is declared in a function named func0. Which of the following is considered safe in C ? a. func0 returns \&my_int and the caller prints the returned pointer. b. func0 sets the value of a global variable to \&my_int and returns. At some point, another function dereferences the global variable. c. func0 returns \&my_int and the caller dereferences the returned pointer.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!