1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Bezzdna [24]
3 years ago
14

What is the magnitude of the largest positive value you can place in a bool? a char? an int? a float?

Computers and Technology
1 answer:
MaRussiya [10]3 years ago
7 0

Answer:

A bool can hold only true or false values.

A char can hold maximum 65535 characters.

An int can hold maximum positive value of 2,147,483,647.

A float can hold maximum positive value of 3.4 x 10^{38}.

Explanation:

Primitive data types in Java language can be categorized into boolean and numeric data types.

Numeric can be divided further into floating point and integral type. Floating data type includes float and double values while and integral data type which consists of char, int, short, long and byte data types.

Every data type has a range of values it can hold, i.e., every data type has a minimum and maximum predefined value which it is allowed to hold. The intermediate values fall in the range of that particular data type.

Any value outside the range of that particular data type will not compile and an error message will be displayed.

The data types commonly used in programming are boolean, char, int and float.

A boolean variable can have only two values, true or false.

A char variable can hold from 0 to 65535 characters. Maximum, 65535 characters are allowed in a character variable. At the minimum, a char variable will have no characters or it will be a null char variable, having no value.

An int variable has the range from minimum -2^{31} to maximum 2^{31} – 1. Hence, the maximum positive value an int variable can hold is (2^{31}) – 1.

A float variable can hold minimum value of 1.4 x 10^{-45} and maximum positive value of 3.4 x 10^{38}.

The above description relates to the data types and their respective range of values in Java language.

The values for boolean variable remain the same across all programming languages.

The range of values for char, int and float data types are different in other languages.

You might be interested in
In this assignment we are going to practice reading from a file and writing the results of your program into a file. We are goin
zhenek [66]

Answer:

In Python:

import os.path

from os import path

fname = input("Filename: ")

if path.exists(fname):

with open(fname) as file_in:

 lines = []

 for line in file_in:

  lines.append(line.rstrip('\n'))

f = open("stat.txt","r+")

f.truncate(0)

f = open("stat.txt", "a")

f.write("Names\tTotal\tSubjects\tAverage\n")

for i in range(len(lines)):

 rowsum = 0; count = 0

 nm = lines[i].split()

 for j in nm:

  if (j.isdecimal()):

   count+=1

   rowsum+=int(j)

 average = rowsum/count

 f.write(nm[0]+"\t %3d\t %2d\t\t %.2f\n" % (rowsum, count, average))

f.close()

else:

print("File does not exist")

Explanation:

See attachment for explanation where comments were used to explain each line

Download txt
6 0
3 years ago
You are studying at the library and someone at your table has some great study material. both of you have an ipad with you. you
myrzilka [38]
C.apple domain is to use the personal sharing files from one computer to another computer
3 0
3 years ago
In a stack data structure, the following items are inserted in the following order: Bob, Alice, Charlie, Eve, Zebra. Then an ite
const2013 [10]

Answer:

Zebra.

Explanation:

Stack is LIFO, so Zebra is added in the last so it will be removed first.

6 0
3 years ago
What is the domain and path in this URL? www.example.com/homepage.html​
Alex17521 [72]

Answer:

the domain is example.com. the path is /homepage

Explanation:

4 0
2 years ago
Does anyone have a pdf of the greatest by eddie van der meer????
gregori [183]

Answer

aight' so im finding it but i have to asnwer before someone else so look in the comments for it.

Explanation:

Just wait i getting it rn

3 0
2 years ago
Other questions:
  • On the food inventory worksheet, enter a function in cell G1 that counts the number of Food Items. What formula would i use!? Th
    5·1 answer
  • Help plz
    5·1 answer
  • What are three ways to call attention to the text on a web page?
    6·2 answers
  • Grandma Ester normally gives you hugs for your birthday - one for every year old you are. When you turned 15, she squished you w
    8·1 answer
  • Which term describes the second core IPSec security protocol; it can perform authentication to provide integrity protection, alt
    13·1 answer
  • Choose all the answers that apply.
    15·1 answer
  • Please help
    11·1 answer
  • Which of these would be the fastest transition duration?
    6·2 answers
  • 7.12 LAB: Even/odd values in a list
    6·1 answer
  • What happens when you restrict someone on messenger?.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!