Question: Part 1 : Assume that num is a float variable declared elsewhere. What is the value of val after the two statements num = 500000000.0;

Part 1: Assume that num is a float variable declared elsewhere. What is the value of val after the two statements num = 500000000.0; val = (int) num; are executed?

Part 2: Complete the sentence "In C, the evaluation result of a condition is represented by _________".

Select the TWO options that correctly indicate the answer to either Part 1 or Part 2 of this question. Each wrongly selected option will result in 1 mark being deducted.

a.

Part 1: overflow, if val was declared as an int

b.

Part 1: 500000000

c.

Part 1: code will not compile, regardless of how variable val was declared

d.

Part 2: non-zero (usually 1) or 0

e.

Part 2: true or false

f.

Part 2: on or off

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!