Page 1 of 1

Suppose a local variable int my_int is declared in a function named func0. Which of the following is considered safe in

Posted: Thu Jul 14, 2022 2:18 pm
by answerhappygod
Suppose A Local Variable Int My Int Is Declared In A Function Named Func0 Which Of The Following Is Considered Safe In 1
Suppose A Local Variable Int My Int Is Declared In A Function Named Func0 Which Of The Following Is Considered Safe In 1 (36.32 KiB) Viewed 32 times
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.