English

State the Value of Characteristic and Mantissa When the Following Code is Executed: String S = “4.3756”; Int N = S.Indexof(‘.’); Int Characteristic=Integer.Parseint (S.Substring (0,N)); Int Mantissa

Advertisements

Question

State the value of characteristic and mantissa when the following code is executed:
String s = “4.3756”;
int n = s.indexOf(‘.’);
int characteristic=Integer.parseInt (s.substring (0,n));
int mantissa=Integer.valueOf(s.substring(n+1)); 

Short Answer
Advertisements

Solution

Value of characteristic = 4 and
Value of mantissa = 3756.

shaalaa.com
  Is there an error in this question or solution?
Chapter 4: String Handling - Review Insight [Page 285]

APPEARS IN

Avichal Computer Applications [English] Class 10 ICSE
Chapter 4 String Handling
Review Insight | Q 9. | Page 285
Advertisements
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×