what does this print?

int fun(int p);
void main()
int x = 3, y[10] = {1,2,3};
y[1] = fun(x);
printf("%d %d", x,y[1]);
int fun (int p)
p = 1;
return 1;
What do you think is displayed?

This is YOUR test, not ours.
its not duplicated, read the end they r different
You learn by trying. If there are parts of the program that you do not understand look them up, or ask about them here. The program starts on the first line in main() so I suggest starting there, make sure you understand what each line is doing, and keep track of what the output is.
Last edited on
what does this print

Put the code into a file (or use an IDE), compile it, run it and see what is displayed. Then if you don't understand, use the debugger to trace through the code to see what is happening, and then if you don't understand a particular line, then ask.
Topic archived. No new replies allowed.