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
boyakko [2]
3 years ago
7

Difference between implicit and explicit type casting

Computers and Technology
2 answers:
Lana71 [14]3 years ago
7 0

Answer:

Implicit type casting means the type casting done by the compiler during compilation of program whereas Explicit type casting means the programmer explicitly type casts the variables. This is the difference implicit and explicit type casting.

Explanation:

Type casting means the conversion of one data type into another data type. There are two types of type casting. They are Implicit type casting and Explicit type casting.

<u>Implicit type casting:</u> The type casting which is done by the compiler during the compilation of a program. This occurs when we assigning smaller data type to larger data type and also both the data type are compatible. Below example clears the above concepts.

Ex: int \, i = 10;

long \, l = i;

In the above example " i "  is " int " data type whereas  " l " is long data type but as we assigned the value of " i " to " l ". Here " int " and " long " are compatible data types and we assigned smaller data type ( int - i ) to larger data type  ( long - l ) implicit type casting occurs.

<u>Explicit type casting:</u> The type casting which is done by the programmer explicitly to convert one data type into other data type. If we want to assign a value of larger data type to smaller data type explicit type casting is required. Below example clears the above concepts.

Ex: double \, d = 10.4;

long\, l = (long) d;

In the above example " d " is " double " data type whereas " l " is " long " data type. Here we are explicitly type casting to change larger data value ( double - d ) to smaller data value ( long - l ).  

ivolga24 [154]3 years ago
7 0

.Answer: When one data type  is converted to another data type it is called typecasting. Typecasting can be both implicit and explicit.

Implicit typecasting is done by the compiler without the involvement of the programmer. However, explicit  typecasting is done by the programmer whereby it asks the compiler to make the desirable data type changes.

Explanation:

Examples of implicit typecasting are:

int a = 2;

float b= 3.14;

Here, the compiler can make the desired changes.

Examples of explicit typecasting :

double a = 4;

int b = (int)a;

Here, the programmer is explicitly asking the compiler to make the changes in the data type.

You might be interested in
What is one of the fastest ways to search for an items on a specfic web site
kap26 [50]

Geogle is the the fastest way

Explanation:

8 0
3 years ago
Binary numbers can be shifted left or right to alter their value.
Hoochie [10]
Maybe try “01110011”
6 0
3 years ago
what is the least expensive way to connect five computers using a wired network to a router that has only four network ports?
ExtremeBDS [4]

Answer: Get wifi.

Explanation: Get wifi.

5 0
2 years ago
I give brainliest.
dezoksy [38]

Answer:

D.

Explanation:

Code won’t <em>usually</em> recognize statements like humans do, code has to be consistent unlike human speech.

6 0
3 years ago
What is a modem and what are its uses?
Bond [772]

Answer:

a combined device for modulation and demodulation, for example, between the digital data of a computer and the analogue signal of a phone line. Basically, a modem is used to connect the analog world to the digital world. In other words, you can say it is the device that is used to convert the analog signal to digital signal

Explanation:

6 0
3 years ago
Read 2 more answers
Other questions:
  • In a programming language, a(n) ______, or command, is a word with a predefined meaning​
    6·2 answers
  • During an interview, your non-verbal communication (body language, gestures, tone of voice, speed of talking,
    6·1 answer
  • A honeypot is sometimes called a(n) __________.
    11·1 answer
  • What are short handled screwdrivers used for?
    12·1 answer
  • In an average case involving an array of n elements, how many times will a sequential search function have to read the array to
    13·1 answer
  • XYZ Corp.’s facilities in Nashua, New Hampshire, are two office buildings 400 feet apart, each with its own LAN. To connect the
    9·1 answer
  • Kristi, an event planner, wants to store caterers’ names and contact information in an organized manner. Kristi will MOST LIKELY
    13·1 answer
  • Name 3 supercomputers along with their cost, purpose and the country it is located.​
    15·1 answer
  • How many passes will it take to find the five in this list?
    14·2 answers
  • _______ refers to the use of gps or rfid technology to create virtual boundaries that enable software to trigger a response when
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!