Answered step by step
Verified Expert Solution
Question
1 Approved Answer
13.The value of x and y after the execution of following program would be: void func( int *a, int *b){ int tmp = *a; *a
13.The value of x and y after the execution of following program would be:
void func( int *a, int *b){
int tmp = *a;
*a = *b;
*b = tmp;
}
int x = 5, y = 10;
func(&x, &y);
- x = 5, y = 10
- x = 5, y = 5
- x = 10, y = 5
- x = 10, y = 10
14. What will be the following function return value when you are passing n = 5 into it.
int func(int n){
int i, j;
for(i=1, j=1; (i<=n); (j *= i), i++);
return j;
}
- 5
- 0
- 120
- 1
15. Advantage of using linked list compare to array are_____________
- They allow easy insertion of value and deleting it
- It is easy to work with linked list while using stack and heap
- They require less memory compared to array
- They can reduce access time.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started