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
Debora [2.8K]
2 years ago
9

should variables that contain numbers always be declared as integer or floating-point data types? why or why not? name potential

examples.
Computers and Technology
1 answer:
Stells [14]2 years ago
6 0

No, it is not necessary that variables that contain numbers should always be declared as integer or floating-point data types.

It is not necessary that variables that contain numbers should be declared as integer and floating point data types. Because number can be declared with different data types.  As we know that data type is a vital aspect in programming. It describes the type of a value that is contained in a variable. It is the data type based on which memory is allocated to a number or any type of variables.

Numbers can be whole decimal/fractional, signed, unsigned, small, and long. Simply, they exist in a variety of values. According to their values range, the amount of memory is reserved.

Different programming languages offer different data types to store numbers, depending on their types and size. Let’s consider some examples of data types used in programming languages in order to declare variables holding numbers.

  • In Python int, float, and complex are the data types used to declare number type variables.
  • SQL uses INTEGER, SMALLINT , BIGINT , NUMERIC() , and DECIMAL() data types for numbers.
  • To deal with number type variables, Java has six predefined data types, such as int, long, short, byte, float, and double.
  • JavaScript uses a single data type called 'number' to declare numbers.
  • In C++, two fundamental data types, int and float, are used to represent numeric variables. But C++ is not only limited to these two data types. The data type char can also store numbers. Other data types for declaring numbers as variables are derived from int, float and char, such as short int, long int, signed int, unsigned int, double, long double, signed char, unsigned char etc. etc.

So in concluding remarks, declaring a number type variable is not only limited to using integers and floating-points data types. Rather it entirely depends on the respective programming language, and size and type of the number to be stored in the variable.

You can learn more about data types at

brainly.com/question/13438922

#SPJ4

You might be interested in
Explain how can we determine that where is the strength of magnetic force maximum in a
snow_lady [41]

Answer:

by making a experiment

Explanation:

8 0
3 years ago
When’s The release date for Mobile legends project next phase 3 going To come
Gennadij [26K]

Answer: This Project will involve Hero Revamps, Hero Adjustments, Hero Remodels, and much more. Project NEXT is divided into 2 phases: the first phase was released on September 22, 2020, the second phase was released on June 15, 2021 and the third phase is to be released on "September 2021".

4 0
3 years ago
Help me please I dont have enough points for people just to get these for free
Gekata [30.6K]

Answer:

help me please I dont have enough points for people just to get these for free

Sam is a movie director. He has asked his storyboard artist to create an image of the central character looking ecstatic after receiving an award. What type of shot does the director need from the storyboard artist?

A. long shot

B. point of view shot

C. reaction shot

D. jump cut​

A is the asnwer

3 0
2 years ago
In a ______________ graphic you can include text and pictures and you can apply colors, effects, and styles that coordinate with
DerKrebs [107]
In a presentation graphic
8 0
3 years ago
What does the format painter button in excel do
wlad13 [49]
The format painter button in excel copies formatting from one place and it applies it to another
7 0
3 years ago
Other questions:
  • Vaporization is the process in which liquid is sufficiently cooled to change states of matter from a liquid to a vapor true or f
    8·1 answer
  • ………………….. is the process of causing a system variable to conform to some desired value. Options Control feedback Design none of
    9·1 answer
  • Write a program that converst the temperature from Celcius to Fahrenheit. The formula is: F (9/5)C+32
    12·2 answers
  • Andy, a developer, is designing a new program. Which tool should Andy use to help him complete his task?
    13·1 answer
  • An administrator has initiated the process of deploying changes from a sandbox to the production environment using the Force IDE
    5·1 answer
  • __________ is a very simple form of lossless data compression in which runs of data (that is, sequences in which the same data v
    6·1 answer
  • How do you change your age on Brainly?
    10·1 answer
  • Im bored anyone up for a convo? lets talk.. =D
    7·2 answers
  • Find the root using bisection method with initials 1 and 2 for function 0.005(e^(2x))cos(x) in matlab and error 1e-10?
    8·1 answer
  • What does a blinking yelow light mean on a phillips sonicare toothbrush
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!