#7: Type Conversion in C | Implicit and Explicit Type Conversion

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ก.ย. 2024

ความคิดเห็น • 302

  • @programizstudios
    @programizstudios  2 ปีที่แล้ว +12

    🔥Finding it Damn Hard to Understand C Programming?
    Learn to code-the right way-with interactive lessons, quizzes & challenges. Build a strong programming base; it's IMPORTANT!
    Try Programiz PRO for Free: bit.ly/master-c-programming

    • @josepharulvinnarasi6845
      @josepharulvinnarasi6845 2 ปีที่แล้ว

      Thank you

    • @okochafrancisca1683
      @okochafrancisca1683 ปีที่แล้ว

      Hello, how do I get an average of 3

    • @YuvrajPrajapati-wh4qb
      @YuvrajPrajapati-wh4qb 2 วันที่ผ่านมา

      I noticed your continue smile in every tutorial.
      I know it's your profession part and you have to do. You might feel you chicks tired and painfully.
      But this is the truth. Society wants work.
      Thank you for these videos carrying you continue smile face yes it's not natural but good job womean.
      Hope you let your chicks relax....

  • @arulmalararjunan6748
    @arulmalararjunan6748 2 ปีที่แล้ว +211

    FOR CHAR = 'c' (1:33) in video
    ASCII VALUE means
    Input: N = 8
    Output: 8 (56)
    Explanation:
    ASCII value of 8 is 56
    TO PRINT THE ASCII VALUE, 48 is required to be added to the digit.
    0 = 48
    1= 49 (48 + 1)
    2 = 50 (48 + 2)
    3 = 51 (48 + 3)
    the ASCII NO. only have [ 0-9 ] only , which is [ 48-57 ]
    Initially, i also dn but i searched for it and share some here. Hopefully it helpful. If yes like this comment. TQ. For more info searched it at google.

  • @amphorashaven7258
    @amphorashaven7258 2 ปีที่แล้ว +76

    The answer is 68.
    '8' means it is a char data type variable.
    Hence, the char data will be converted to the ASCII value '56',
    making it 56 + 12 which is = 68.
    Thank you for the wonderful tutorials.

    • @qarikhalidwaheed1643
      @qarikhalidwaheed1643 ปีที่แล้ว +1

      Exactly

    • @jackienanyonjo5447
      @jackienanyonjo5447 11 หลายเดือนก่อน

      How do we get 56

    • @yagmur8013
      @yagmur8013 10 หลายเดือนก่อน

      @@jackienanyonjo5447 take a look at the ascii table

    • @MATHS_with_MO
      @MATHS_with_MO 9 หลายเดือนก่อน

      printf("%d",name of variable );

  • @pristinewalek4578
    @pristinewalek4578 2 ปีที่แล้ว +36

    Answer is B .
    I am just a beginner and your tutorial has been of great help. Thankyou !!

  • @magicalmoments9663
    @magicalmoments9663 2 หลายเดือนก่อน +2

    This content has taught me more for free than I ever thought, keep up the good work.

  • @mdsahil2203
    @mdsahil2203 2 ปีที่แล้ว +15

    Absolutely amazing video 👍👍
    Keep going sister
    Nice way of teaching

  • @sakib.2023joy
    @sakib.2023joy ปีที่แล้ว +2

    Your explanation is easy to understand . Thanks

  • @KingBygone
    @KingBygone ปีที่แล้ว +4

    The value of the result in the statement is "int result = '8' + 12; is '68"
    The reason being that, the ASCI value for '8' is = 56, therefore 56+12 = 68.
    Thank you

  • @shanmicklerecana7897
    @shanmicklerecana7897 2 ปีที่แล้ว +3

    #include
    #include
    int main()
    {
    char a = '8';
    int b - 12;
    char result = (char) a + b;
    printf("%d", result);
    }
    I always watching in this channel and practice, i amazed because you explain even small details and i love it.

  • @osys7832
    @osys7832 2 ปีที่แล้ว +4

    Here's the general rules
    T result =
    here first the expression is evaluated and what ever the the result is, it is always converted to the type of T at the end.
    Expression could be a complex one, but it is evaluated according to the presendence of the operators.
    double res = 5 / 2 + 1.0; // in this case (5/2) is evaluated as 2 and the temporary result (2) is located in the expression.
    which is double res = 2 + 1.0 and in this case since one operant is double 2 is promoted and became 2.0
    double res = 2.0 + 1.0 then the addition is performed and res is assigned to 3.0

  • @digital_a2_art
    @digital_a2_art 11 หลายเดือนก่อน +3

    The Answer is 68.
    '8' means it is a char data type variable to the ASCll value => 56
    And Addition it 56 + 12 which Answer is = 68.
    Thank you for Wonderful Tutorials.

    • @yasmineeddouh6447
      @yasmineeddouh6447 7 หลายเดือนก่อน

      How do you know that ‘8’ becomes 56?

  • @krutarthparekh7910
    @krutarthparekh7910 2 ปีที่แล้ว +1

    I have started watching videos from today only and was thinking that c language is tough but thanks your videos make it look easy to understand

  • @FahimaWali-v9v
    @FahimaWali-v9v 5 หลายเดือนก่อน

    The answer is option b(68).
    Thanks, I've learned a lot from watching these videos. :)

  • @debojitacharjee
    @debojitacharjee ปีที่แล้ว +9

    *INT WAS CONVERTED TO DOUBLE NOT BECAUSE OF THE RANKING* - the int data type was converted to double because of *promotion* as the result variable was of higher rank but if it was of lower rank like int then there would be *demotion.* Therefore no matter what the rank of the variable type is on the right side, the implicit conversion is done based on the ranking of the left side variable type.

  • @CR0WS_ZR0
    @CR0WS_ZR0 ปีที่แล้ว +2

    ASCII value of digits [0 - 9] ranges from [48 - 57]. Therefore, in order to print the ASCII value of any digit, 48 is required to be added to the digit.

  • @collinshagembe7852
    @collinshagembe7852 ปีที่แล้ว +3

    #include
    int main() {
    char a = '8';
    int b= 12;
    int result = '8' + 12;
    printf("%d", result);
    return 0;
    }
    The output is 68

  • @ranjithn7191
    @ranjithn7191 2 ปีที่แล้ว +13

    int main() {
    char a='8';
    int b=12;
    int result=a+b;
    printf("%d",result);
    return 0;
    }
    i get 68 as the output and anyone tell me is this correct

  • @ogungataiyelolu4681
    @ogungataiyelolu4681 ปีที่แล้ว

    This is the best tutorial video ive ever seen online, I'm sorry but I love every bit of this so much.

  • @V1ctorinos
    @V1ctorinos 2 หลายเดือนก่อน

    Is B - 68. Thank's for the lesson and clear explanations !

  • @bandulajagathkumara1038
    @bandulajagathkumara1038 ปีที่แล้ว +4

    The output = 68.
    '8' is converted to it's ASCII value and then added to the int value 12.
    ASCII value of '8' = 56
    Sum = 56 + 12 = 68.

    • @jackienanyonjo5447
      @jackienanyonjo5447 11 หลายเดือนก่อน +1

      How do we get 56

    • @adan7928
      @adan7928 11 หลายเดือนก่อน

      you need to refer ASCII table Char = '8' equal to 56@@jackienanyonjo5447

  • @VivekKumar-zu7tn
    @VivekKumar-zu7tn 2 ปีที่แล้ว +4

    was waiting for this one for awhile

  • @Ech-chatouiMohammed
    @Ech-chatouiMohammed 18 วันที่ผ่านมา

    keep working on this amazingly helpful project

  • @__Roronoa_Zoro_19
    @__Roronoa_Zoro_19 4 หลายเดือนก่อน

    The Answer is 68.
    Thank You for the great explanation 🙏 .

  • @miarose5382
    @miarose5382 2 ปีที่แล้ว +4

    Your teaching style is amazing !! Please upload more videos

  • @davidajimati980
    @davidajimati980 2 ปีที่แล้ว +1

    Thank your for these tutorials.. It's really well explained

  • @firedragonmangaming2410
    @firedragonmangaming2410 2 ปีที่แล้ว +2

    Answer is 68
    #include
    int main(){
    int result = '8' + 12;
    printf("%d", result);
    return 0;
    }

  • @laxmanyadavyadav8810
    @laxmanyadavyadav8810 2 หลายเดือนก่อน

    You speaking skill and teaching skill too much good for me so I say thank you mam

  • @UjjawalKumar-0
    @UjjawalKumar-0 2 ปีที่แล้ว +5

    I watched your 7 videos continuously because it is too valuable, easy and short to understand and learn 😊

  • @nuetrkn
    @nuetrkn ปีที่แล้ว +1

    Thank you programiz,thank you Padma manandhar 🙌👏👏💗

  • @Darkness-898
    @Darkness-898 4 หลายเดือนก่อน +1

    Programiz Quizz Answer: Option(B) 68
    Explanation:
    int result = '8' +12;
    here, '8' takes the input as 56 because '8' indicates the ASCII value of 8 which is 56. Hence, the addition will be 56+12 which is 68.
    TIPS:
    The ASCII No.s are from 0-9 which have the value from 48-57.

  • @simengrandal6898
    @simengrandal6898 11 หลายเดือนก่อน +1

    B. 68
    #include
    int main() {
    char a = '8'; // char '8' in ASCII = 56 a = 56
    int b = 12; // b = 12
    int result = a + b; // result = 56 + 12 68
    printf("
    %d
    ", result);
    }

  • @مهدیذکاوت
    @مهدیذکاوت ปีที่แล้ว +1

    Hello. Thank you for your great cors. Please add the advance level for c programming too. Thanks alot ❤

  • @Lolz_amv
    @Lolz_amv 2 ปีที่แล้ว

    I am just a beginner and your tutorial has been of great help. Thankyou !!

  • @hasnainumar_1
    @hasnainumar_1 ปีที่แล้ว +1

    Precise and accurate. Thank you so much. 🥺🥺

  • @Project.i
    @Project.i 5 หลายเดือนก่อน +1

    option B is the correct answer because
    ('8' +48) +12 = 68
    explanation: Always add more 48 to find ascii value of the desired number

  • @nihatdonmzov4166
    @nihatdonmzov4166 ปีที่แล้ว +1

    Thank you so much

  • @nihatdonmzov4166
    @nihatdonmzov4166 ปีที่แล้ว +1

    Perfect video as always thank you😍🤩

  • @nutella.mp4853
    @nutella.mp4853 10 หลายเดือนก่อน +3

    9:21 my answer is 68

  • @sibonginkosiphiri6269
    @sibonginkosiphiri6269 ปีที่แล้ว

    char a = '8';
    int b = 12;
    int result = '8' + 12;
    printf ("%d" , result );
    answer is B

  • @user-nt4nm4fb3u
    @user-nt4nm4fb3u 8 หลายเดือนก่อน

    Thank you for doing it, great explanation 👍.

  • @DicksonEsibitar
    @DicksonEsibitar 4 หลายเดือนก่อน

    Representations are really awesome madam❤

  • @asmrjigglypuff
    @asmrjigglypuff ปีที่แล้ว

    5:50 let me sow u :3 just kidding. i love the way you describe everything. it's so clear and understandeable!

  • @alexandredarochamendez4654
    @alexandredarochamendez4654 ปีที่แล้ว +3

    Essas aulas estão me salvando muito, parabéns.

  • @qarikhalidwaheed1643
    @qarikhalidwaheed1643 ปีที่แล้ว

    The answer is B.😀👍👍
    I used C to answer it:
    #include
    int main() {
    char quiz = '8';
    printf("%d", quiz + 12);
    return 0;
    }

  • @sakib.2023joy
    @sakib.2023joy ปีที่แล้ว

    char a = '5';
    Here the ASCII number of character 5 is 53 as per ASCII table
    53 is the decimal value of char 5

  • @voyagers5026
    @voyagers5026 2 ปีที่แล้ว +1

    it was great really and easy precise

  • @kalpitkatpara2720
    @kalpitkatpara2720 ปีที่แล้ว

    really good course on C for the beginners!

  • @alirezaz9896
    @alirezaz9896 2 ปีที่แล้ว

    the best beginners tutorial , i wish you made the advanced playlist too🥲🥲

  • @gangotrigangotri7469
    @gangotrigangotri7469 ปีที่แล้ว

    Thank you so much mam really.. U teaching level is super.. Mam...

  • @nihatdonmzov4166
    @nihatdonmzov4166 ปีที่แล้ว +1

    Great

  • @aman-wb2ct
    @aman-wb2ct 4 หลายเดือนก่อน

    One question, when writing rhe programs in copy we also use include and getch() but here we are not, any reason?

  • @MG-dj7kf
    @MG-dj7kf ปีที่แล้ว

    ANSWER = 68
    int a = '8';
    int b = 12;
    int result = a + b;
    printf("%d", result);

  • @cloudproblemssolved
    @cloudproblemssolved 7 หลายเดือนก่อน

    converting a decimal (double) to an integer with int will result in data loss by throwing away everything after the decimal point, pretty neat

  • @amitube663
    @amitube663 ปีที่แล้ว

    The answer is B
    thank you for support.

  • @GautamGskiTec
    @GautamGskiTec หลายเดือนก่อน

    good explanation.

  • @Sriram_69
    @Sriram_69 ปีที่แล้ว

    You are amazing with your talent sister 😮

  • @HamidatOlaoti
    @HamidatOlaoti ปีที่แล้ว

    The output is 8
    X =5+2*9/3-3
    We first start with the division,5+2*3-3
    Next is mul.5+6-3
    Next is add,11-3
    Then we subtract=8

  • @stephenoginga5926
    @stephenoginga5926 2 หลายเดือนก่อน

    very informative

  • @thineshnayar5397
    @thineshnayar5397 2 ปีที่แล้ว +1

    I'm waiting for your next video pls upload as soon as possible✨😇

  • @emmanuels.k.dekpah
    @emmanuels.k.dekpah 5 หลายเดือนก่อน

    program #include
    int main(){

    char a ='8';
    int b = 12;
    int result = '8'+12;
    printf("%d", result);
    answer is 68

  • @srpcdgaming
    @srpcdgaming ปีที่แล้ว +1

    In acsii the value 8 is 56, so 56 + 12 is equal to 68

  • @dianafarhat9479
    @dianafarhat9479 2 ปีที่แล้ว +1

    Thank you!

  • @bishalgupta494
    @bishalgupta494 2 ปีที่แล้ว

    Thank you for great explain 🙏

  • @mr_ravi_ranjan
    @mr_ravi_ranjan 2 ปีที่แล้ว

    Very easy best I can learn

  • @johnsabianestrera1848
    @johnsabianestrera1848 2 วันที่ผ่านมา

    yes

  • @balashebjadhav977
    @balashebjadhav977 ปีที่แล้ว

    Answer is B) 68 Because Ascii value of 8 is 56

  • @SerajAlhorany
    @SerajAlhorany หลายเดือนก่อน

    thanks

  • @UjjawalKumar-0
    @UjjawalKumar-0 2 ปีที่แล้ว

    result='8'+12
    (The ask you value /ASCII value of '8' is 56.)
    Then,
    result= 56 +12 = 68

  • @onic9623
    @onic9623 ปีที่แล้ว +1

    Option B : 68

  • @fouadmajidi2568
    @fouadmajidi2568 3 หลายเดือนก่อน

    I'm leaving a comment for the algorithms

  • @himanshuparmar5909
    @himanshuparmar5909 2 ปีที่แล้ว +1

    Thankyou😇

  • @arafathdhroba8897
    @arafathdhroba8897 ปีที่แล้ว

    thank you

  • @imefamilia-x8e
    @imefamilia-x8e ปีที่แล้ว

    can you explain why '5' goes to 53 i cant get it

  • @nandinivagdevi8604
    @nandinivagdevi8604 5 หลายเดือนก่อน

    Here 8 value =56 and 56+12= 68. S0,option =B

  • @tapendra_shahi
    @tapendra_shahi 5 หลายเดือนก่อน

    Ans 68❤❤❤from Nepal

  • @seabasschukwu6988
    @seabasschukwu6988 ปีที่แล้ว

    thank you so much ❤❤❤

  • @Okoko262
    @Okoko262 2 หลายเดือนก่อน +1

    answer : 68 mam

  • @rajeshbadathala9608
    @rajeshbadathala9608 2 ปีที่แล้ว +1

    The out put value is 68. when B is the answer

  • @chintusingle
    @chintusingle ปีที่แล้ว +1

    #include
    int main() {
    char a = '8';
    int b = 12;
    int result = a + b;
    printf("%d", result);
    return 0;
    }
    the output is : 68

  • @ayushratnaparkhi6107
    @ayushratnaparkhi6107 2 ปีที่แล้ว +1

    printf("The answer is 68 option B
    ");

  • @rohitattri21
    @rohitattri21 2 ปีที่แล้ว +2

    The Answer is = 68;
    MAM

  • @hashimsulaiman6003
    @hashimsulaiman6003 ปีที่แล้ว

    how do you know task values of characterss

  • @annettewairimu5542
    @annettewairimu5542 6 หลายเดือนก่อน

    B is the correct answer.

  • @bassithmohamadh8451
    @bassithmohamadh8451 6 วันที่ผ่านมา

    B
    Is the right option

  • @kendalwilliams5128
    @kendalwilliams5128 7 หลายเดือนก่อน

    thanks so much!

  • @VinyZikss
    @VinyZikss 2 ปีที่แล้ว

    great video, i just found the way you pronounce "zero zero zero" very funny 😅

  • @ashutoshurkudkar1080
    @ashutoshurkudkar1080 2 ปีที่แล้ว +1

    Awesome 😎😎😎👍

  • @EdogunUyi
    @EdogunUyi ปีที่แล้ว

    68
    The ASCII value of '8' is 56

  • @a.s.laksharaa4148
    @a.s.laksharaa4148 ปีที่แล้ว

    option b is correct 68

  • @SteveWatts-dx1ud
    @SteveWatts-dx1ud 5 หลายเดือนก่อน

    answer is 8 for operators

  • @Cartoons5001HD
    @Cartoons5001HD 9 หลายเดือนก่อน

    The answer is B for programiz quiz

  • @One_piece1089
    @One_piece1089 ปีที่แล้ว

    amazing vidio

  • @emmanuelarthur3081
    @emmanuelarthur3081 ปีที่แล้ว

    Great video ❤

  • @toykeem
    @toykeem ปีที่แล้ว

    The answer to the quiz question is opion B
    Happy programming

  • @ephratatesfaye2301
    @ephratatesfaye2301 ปีที่แล้ว +1

    Answer B

  • @tinaramwani
    @tinaramwani ปีที่แล้ว +1

    Char means ? Why 8 will convert to 56?

    • @eliteffsquadron9932
      @eliteffsquadron9932 5 หลายเดือนก่อน

      Char is a type of data type that’s used for charecters (a,b,c,d, “ll”, “4” etc) and over here we are using 8 as a character and not an integer hence in the arithmetic operation the ASCII value of 8 is taken (which is 56) ❤

  • @khayalabdullayev
    @khayalabdullayev ปีที่แล้ว

    thanks a lot

  • @karanvirsingh6247
    @karanvirsingh6247 7 หลายเดือนก่อน

    Ans B 68 ; ASCII value of 8 is 56

  • @aderolearnsengineering
    @aderolearnsengineering ปีที่แล้ว +1

    B. 68

  • @VickyKumar-zs7cv
    @VickyKumar-zs7cv 2 ปีที่แล้ว +2

    68