Saturday, 18 December 2021

typecasting

 // what typecasting is?

// typecasting is the process of inter-converting one data type
to another.
// ek data type ko dusre data type me change karne ki process
ko typecasting kahte he.
// to tpyecast a specific data usse pahle ("") ke andr vo data
type likhte he jo type karana ho.
// float b= 54/5, then b will be 10 not 10.8 because both
54&5 integer he to result integer hi hoga.
#include <stdio.h>
int main()
{
    int a = 3;
    float b = (float)54/5;
    printf ("the value of a is %f\n", (float)a);
    printf ("the value of b is %f\n", b);
    return 0;
}
output:_
the value of a is 3.000000 the value of b is 10.800000

No comments:

Post a Comment

here we are to help you.you can watch videos and get information about :- (1) scientific facts (2) education (3) gaming (4) music (5) lyrics (6) cartoons and many more.So keep watching keep learning, thank you.

Recurtions

  //Why are recursions? //We can solve difficult long iteratively can be solved simply recursively. // there are some problems which suite...