101k views
4 votes
1. What is wrong with the following code?

#include
#include
int *get_val(int y) {
int x = 200;
x += y;
return &x;
}
int main() {
int *p, y = 10;
p = get_val(y);
printf("%d\\", *p);
exit(0);
}

User Eudore
by
4.7k points

1 Answer

3 votes

Answer:

Aye dog I don't know nothing about code, yes its true, but I hope that you get an answer for you!

Step-by-step explanation:

Facts...

User KevinT
by
4.0k points