Question: What is the error in the following code snippet? void func(int a) { a += 5; return a; } int main() { func(3); return 0;
What is the error in the following code snippet?
void func(int a) {
a += 5;
return a;
}
int main()
{
func(3);
return 0;
}
a. Cannot change the value of variable a
b. The function cannot be called with a direct value such as 3
c. The function cannot return a value
d. Variable a must be declared in the function
18. What is the output of:
int *x;
int a = 5;
x = &a;
cout<<*x<<" "< a. 5 0x444F b. 5 5 c. 0x444F 5 d. 0x444F 0x444F the answer is cb please explain the answer. thanks so so much
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
