CS201 · Midterm#45
Consider the following code segment. What will be the output of the following program?
int func(int) ;
int num = 10 ;
int main(){
int num ;
num = 5 ;
cout << num ;
cout << func(num) ;
}
int func(int x){
return num ;
}
Show correct answer
Correct answer: C. 5, 10
Check community answers against your course notes.