Computer Science, asked by jithinmathew4999, 1 month ago

Consider a hypothetical machine which supports the following data types:
unsigned char: 1 Byte
unsigned short: 2 Bytes
int: 4 Bytes
Consider the following function red()
int red(unsigned char a, unsigned short b)
{
if (a == 0) return b;
else {
a = a + 1;
b = b*2;
return red(a, b); }
}
int main() {
printf("%d", red((char) 240, 1));
return 0;
}

What will be the output of the following program?

A)The program terminates abnormally

B)The program outputs 65536 (216)

C)The program goes into infinite loop

D)None of these​

Answers

Answered by DeepakUgalePatil
1

Answer:

c the program goes into infinite loop

because function call self and not break point to break state very weak

Answered by vinod04jangid
0

Answer:

option-c

Explanation:

the program goes into infinite loop.

an infinite loop (or endless loop)[1][2] is a sequence of instructions that, as written, will continue endlessly, unless an external intervention occurs ("pull the plug"). It may be intentional

FINAL ANSWER- option-c

#SPJ3

Similar questions