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]
1 year 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]1 year 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
In Microsoft Windows, which of the following typically happens by default when a file is "double-clicked"
Elenna [48]
Depending on the type of file, it normally runs or opens.
4 0
3 years ago
Read 2 more answers
_________________________ are people, places, and materials, either printed or non-printed, that can provide answers to inquirie
GalinKa [24]

Answer:

Information/knowledge resources

Explanation:

The process of looking for answers to questions that will lead to improved knowledge about a subject is known as an inquiry. The theories of enquiry includes abduction, induction, and deduction

An inquiry can provide the reasoning behind observation by making use of the theories of inquiry and sources that provide answers (information) about the (interrelated) events of the inquiry

Therefore, information and knowledge resources are the people, materials, and places, which can be in the printed, verbal, appearance form that have the capacity to proffer answers to inquiries

6 0
2 years ago
Need deveolpers not software
ivolga24 [154]
Developers? For what?
3 0
3 years ago
Read 2 more answers
Define Based Assessment ​
Oduvanchick [21]

Explanation:

In an educational setting, standards-based assessment is assessment that relies on the evaluation of student understanding with respect to agreed-upon standards, also known as "outcomes". The standards set the criteria for the successful demonstration of the understanding of a concept or skill -WIKIPEDIA

8 0
2 years ago
I WILL MARK THE BRAINIEST!!!!!!!!!!!!! 50 POINTS!!!!!!!
Sauron [17]
Hello,

Your answer would be:

1. It’s important to have a good study skill so you can be ready to take a quiz such as world history.

2. It’s important to know your time on tasks because you don’t want to spend all day on one simple task you want to get things done.

3. A schedule can help you get organzied because it helps you with your time such as this go along with your second question.

Have a nice day :)

~Rendorforestmusic
5 0
3 years ago
Read 2 more answers
Other questions:
  • In the two-level directory, if a user refers to a particular file then__________________ Select one: a. only his/her own UFD (us
    7·1 answer
  • A DSLR camera is made up of two parts. They are
    13·2 answers
  • Which button could Pamela press in the Microsoft Word spell checker to make the word “colour” instantly change to “color” whenev
    11·1 answer
  • What are the TWO methods of copying and pasting on the AutoCAD Clipboard function?
    7·1 answer
  • 4.17 LAB: Varied amount of input data ( C++)
    5·1 answer
  • In a ______topology, every device has exactly two neighbors for communication purposes. A failure in any cable or device can tak
    15·2 answers
  • Which is true about lists and stacks?
    8·1 answer
  • you are working on creating a business document with two other co-workers. Based on just information, which of the following pre
    14·1 answer
  • Ema Company for business .
    14·1 answer
  • In object-oriented analysis, an object is a member of a(n) _____, which is a collection of similar objects.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!