GeeksforGeeks
geeksforgeeks.org โบ dsa โบ explicit-type-casting
Explicit Type Casting - GeeksforGeeks
July 23, 2025 - Explicit Type Casting involves converting a value from one data type to another through explicit instruction within the code. Unlike implicit casting, where the conversion occurs automatically, explicit casting requires the programmer to specify ...
GeeksforGeeks
geeksforgeeks.org โบ dsa โบ implicit-and-explicit-type-casting
Implicit and Explicit type casting - GeeksforGeeks
March 20, 2026 - In explicit casting, the programmer needs to explicitly specify the conversion using casting operators or functions provided by the language. Note: In languages like Python and JavaScript, which are dynamically typed, explicit type casting is ...
Example on Explicit Type Casting in C
00:52
Explicit Typecasting in C Programming #shorts - YouTube
C# Type Casting Explained | Implicit and Explicit Casting in C#
04:08
What is Typecasting in C programming? | Implicit & Explicit type ...
Definition of Explicit Type Casting in C
05:54
Understanding Explicit Type Casting in C || C Programming || Lesson ...
Reddit
reddit.com โบ r/learnprogramming โบ can someone explain to me the difference between implicit and explicit casting, parsing and type conversion.
r/learnprogramming on Reddit: Can someone explain to me the difference between implicit and explicit casting, parsing and type conversion.
September 20, 2018 -
I have recently been taught this stuff at college and its all just went over my head and every lesson i find on YouTube is bad quality.
Thanks in advance.
EDIT: Language is Java
Top answer 1 of 3
3
Explicit casting is when you have something of one type and you explicitly say "Please treat it as this other type". Imagine you have an array of integers and you want to know the average: int total = ... get total of array entries float average = (float)total/numEntries; You need to cast total or else the division will be integer division, but the "why" doesn't matter. The point is you are explicitly saying "change this type". An implicit cast is, well, implicit. You don't explicitly say to cast the value, it just happens: void foo(double someValue) { ... int x = ... somevalue foo(x); Here, x will be converted to a double. That's a cast, but an implicit one. You didn't ask for it to happen, but it happened anyway.
2 of 3
3
Implicit casting is done without you needing to ask for it and explicit casting is done when you ask for it. Implicit casting can't happen where a loss of precision may occur, for example casting a float to an int but can happening when a loss of precision will not occur such as casting an int to a float. int a = 10; float b = 10.5; // Implicit casting float c = a; // This is OK as a float can hold an int value with room to spare int d = b; // This won't be allowed as you could truncate or wrap the value // Explicit casting float e = (float)a; // This is still OK int f = (int)b; // This is OK because we have explicitly asked for it to be cast.
Would a double to int type conversion be considered implicit type conversion? Nov 21, 2020
r/learnprogramming 5y ago
Scaler
scaler.com โบ home โบ topics โบ c - typecasting
C - TypeCasting - Scaler Topics
June 22, 2024 - This typically happens when a "smaller" data type is assigned to a "larger" data type, preserving data integrity. ... 2. Explicit Type Casting: Explicit type casting in C involves manually converting a value from one data type to another using the casting operator (new_data_type).
changing an expression from one data type to another
Wikipedia
en.wikipedia.org โบ wiki โบ Type_conversion
Type conversion - Wikipedia
June 5, 2026 - Explicit type conversions are either indicated by writing additional code (e.g. adding type identifiers or calling built-in routines) or by coding conversion routines for the compiler to use when it otherwise would halt with a type mismatch. In most ALGOL-like languages, such as Pascal, Modula-2, Ada and Delphi, conversion and casting ...
Codefinity
codefinity.com โบ courses โบ v2 โบ 5e212c93-7f58-440d-b0d3-1446fb2b42b3 โบ 09588d9f-333f-4008-a2cb-2504da8a122d โบ 99e0939a-6cf7-40a2-98ed-fddadf560dec
Learn Basic Type Casting | Dealing with Data Types
Explicit type casting is when you, as the programmer, tell the computer to convert a value to a different data type. This is necessary when converting from a larger data type to a smaller one because some data might be lost.
Microsoft Learn
learn.microsoft.com โบ en-us โบ dotnet โบ csharp โบ programming-guide โบ types โบ casting-and-type-conversions
Casting and type conversions - C# | Microsoft Learn
A cast is a way of explicitly making the conversion. It indicates you're aware data loss might occur, or the cast might fail at run time. To perform a cast, specify the destination type in parentheses before the expression you want converted.
Pluralsight
pluralsight.com โบ blog โบ tech guides & tutorials
Explicit and Implicit Type Casting, and the Difference | Pluralsight
This type of casting also involves a cast operator. The process is usually associated with information loss or failure to convert between types. Typically, numeric conversions are mentioned when we convert from a larger precision datatype to a lower precision. Sometimes even converting from a base class to a derived class is also mentioned here. There is an explicit numeric conversions table which comes in handy when you want to figure out which types are compatible.
cppreference.com
en.cppreference.com โบ cpp โบ language โบ explicit_cast
Explicit type conversion - cppreference.com
1) Explicit type conversion (cast notation), also called C-style cast.
Learn C++
learncpp.com โบ cpp-tutorial โบ explicit-type-conversion-casting-and-static-cast
10.6 โ Explicit type conversion (casting) and static_cast โ Learn C++
April 16, 2015 - Fortunately, C++ comes with a number of different type casting operators (more commonly called casts) that can be used by the programmer to have the compiler perform type conversion. Because casts are explicit requests by the programmer, this form of type conversion is often called an explicit ...
Uncodemy
uncodemy.com โบ blog โบ type-conversion-in-c-plus-plus-with-examples-of-implicit-and-explicit
C++ Type Conversion: Implicit vs Explicit with Examples
August 10, 2026 - Example: Explicitly casting double d = 9.99 to int i = static_cast ยท (d) ensures the programmer acknowledges the truncation. Type conversion allows code to work with multiple data types, reducing duplication.
TutorialsPoint
tutorialspoint.com โบ what-are-implicit-and-explicit-type-conversions-in-c-language
Type Conversion in C
There are certain times when the compiler does the conversion on its own (implicit type conversion) so that the data types are compatible with each other. On other occasions, the C compiler forcefully performs the conversion (explicit type ...
Upgrad
upgrad.com โบ home โบ tutorials โบ software & tech โบ type casting in c
Type Casting in C | Implicit vs Explicit with Examples
October 21, 2024 - It helps you control how data is ... which is done automatically by the compiler, and explicit, where the programmer manually casts the value....
TutorOcean
tutorocean.com โบ questions-answers โบ type-casting-in-java
Type-Casting In Java | TutorOcean Questions & Answers
In other words, when the data type of a variable or expression needs to be explicitly downcast to a smaller data type. ... In this example, the double variable d is explicitly cast to the smaller data type int using the cast operator (int).