...
UGC-NET DEC-2019 Part-2
November 7, 2023
Software-Engineering
November 8, 2023
UGC-NET DEC-2019 Part-2
November 7, 2023
Software-Engineering
November 8, 2023

Programming

Question 27

Consider the following C function definition.

int Trial (int a, int b, int c)
{
    if ((a >= b) && (c < b) return b;
    else if (a >= b) return Trial(a, c, b);
    else return Trial(b, a, c);
} 

The function Trial:

A
Finds the maximum of a, b, and c
B
Finds the minimum of a, b and c
C
Finds the middle number of a, b, c
D
None of the above
Question 27 Explanation: 
Try for (3,2,2), it will go for infinite loop.
Correct Answer: D
Question 27 Explanation: 
Try for (3,2,2), it will go for infinite loop.
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x