Electronics and Communication Engineering - Microprocessors - Discussion
Discussion Forum : Microprocessors - Section 1 (Q.No. 29)
29.
Consider the following program in Pascal
X = 2.57
X = (X + 0.06) * 10
I = TRUNC (X)
X = I
X = X / 10.0
The final value of X would beAnswer: Option
Explanation:
(2.57 + 0.06) 10 = 26.3 → .
Discussion:
10 comments Page 1 of 1.
Lohitha said:
5 years ago
Will anyone please explain it clearly?
Vishakha said:
7 years ago
TRUNC is an instruction use in Pascal language to Truncate a floating point value. In this example:-
X = 2.57,
X =(2.57+0.06)*10=26.3,
I = TRUNC (X), We get X= 26,
X = 26/10.0= 2.6.
X = 2.57,
X =(2.57+0.06)*10=26.3,
I = TRUNC (X), We get X= 26,
X = 26/10.0= 2.6.
Rohit said:
8 years ago
Trunc means? Explain.
Mahi said:
9 years ago
What is Trunc?
S Kumar said:
9 years ago
The trunc gives only integer part of the value x.
Helen said:
9 years ago
What does this trunc instruction do?
Dharani said:
9 years ago
I don't know trunc statement. Please explain anybody.
Apes said:
9 years ago
What about I?
Dev said:
10 years ago
Why C is wrong?
Aarya said:
10 years ago
Please any one can explain the operation of program.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers