C_20 Operators in C - Part 8 | Comma Operator | C Programming Tutorials

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 ธ.ค. 2024

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

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

    Ma'am hats off to ur knowledge, i m ur student from last one year and very glad nd thankful for everything u taught us....thank you so much from the depth of my heart....🙏🏿🙏🏿🙏🏿🙏🏿

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

    Thanks a lot This is the best videos on operators I have seen ever.

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

    Answer is 2
    for b=(a++,++a,a>>2)

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

      @@0xDEAD-C0DE Ask the same thing in the interview too when encountered a que

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

      Let's break down the expression and the code to understand the values of `a` and `b`.
      ### Code Analysis:
      ```c
      int b, a = 2;
      b = (a++, ++a, a >> 2);
      printf("%d
      ", a);
      printf("%d", b);
      ```
      1. **Initialization**:
      ```c
      int b, a = 2;
      ```
      Here, `a` is initialized to 2, and `b` is declared but not initialized yet.
      2. **The comma operator**:
      The comma operator `(a++, ++a, a >> 2)` evaluates each expression from left to right, but only the **rightmost expression** (`a >> 2`) is the value assigned to `b`.
      So let's evaluate the comma operator step by step:

      - **`a++`**: This increments `a` after its current value is used. So, in this case:
      - `a` is initially 2.
      - `a++` uses the value 2 but increments `a` to 3.
      - **`++a`**: This increments `a` before using its value. After `a++`, `a` was already incremented to 3, so now `++a` increments `a` to 4.
      - **`a >> 2`**: After the previous two operations, `a` is now 4. The expression `a >> 2` means a bitwise right shift of `a` by 2 positions. Shifting 4 (binary `100`) right by 2 positions gives `1` (binary `001`).
      **So, `b = 1` because `a >> 2` results in 1**.
      3. **Final value of `a`**:
      After the comma expression, `a` is left as `4`.
      4. **`printf()` statements**:
      - `printf("%d
      ", a);` will print the value of `a`, which is `4`.
      - `printf("%d", b);` will print the value of `b`, which is `1`.
      ### Summary:
      - **The value of `a`** is `4`.
      - **The value of `b`** is `1`.
      ### Output:
      ```
      4
      1
      ```

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

    (a++, ++a, a>>2); == 2 because first value will be avoided and last value will be stored in the computer memory.

  • @SandeepSingh-xn5by
    @SandeepSingh-xn5by 3 ปีที่แล้ว +47

    value of a=10, value of b=2 ;, by following the right shift shortcut mathod

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

    12:49
    a = 2
    b = 2
    a = 2 because the value of a will also be updated to 2

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

    kindly Request . To Pls Make Videos on Python As soon as possible mam ❤️ . Because we are Addicted to u 🙏☺️

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

    11:48 jenny5 (output) since word jenny has five letters ,so the output is jenny5.

  • @Anjali-ek1tj
    @Anjali-ek1tj ปีที่แล้ว +5

    10:02
    int a;
    a = printf ("Jenny"),2,3,4;
    Ans: Jenny
    2
    Because initialisation is already done in first step and after printf and comma is used so it doesn't show error

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

      But it assign the the value 4 thre is two more comma

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

      But why I am getting Jenny as output 4 is not printed in the output 😢

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

    10:05 it will give error
    12:25 it will give a=10 and b=2 because b is 2.5 but as we are writing integer, so float value will be neglected

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

      a=2 not 10 if I am wrong then explain me

    • @Hasini-p6c
      @Hasini-p6c 11 หลายเดือนก่อน

      No at 10:05 it prints..... Jenny
      4

    • @Hasini-p6c
      @Hasini-p6c 11 หลายเดือนก่อน

      It doesn't give error

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

    The explanations are really good!

  • @18fatima15
    @18fatima15 9 หลายเดือนก่อน +3

    10:07 Jenny
    12:26 #include
    int main()
    {
    int a=8,b;
    b=(a++,++a,a>>2);
    printf("%d %d",a,b);
    return 0;
    }
    output: 10 2

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

    Yr teaching style is Awesome mam❤

  • @Liam-10
    @Liam-10 ปีที่แล้ว +9

    int a = 8; in binary it means 00001000
    And a >> 2 means that we'll eliminate the first 2 bits and then it will be 00000010 = 2 in decimal ✅👌

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

    Mam I got a=10,b=2 12:27

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

    b=(a++,++a,a>>2)
    Output =2

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

      why the value of a is 10. please tell me because after evaluating a>>2 expression it's value is 2 i.e., is returned to b. so, a value will also be 2 only. why it is 10? please answer me.

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

    b=(a++,++a,a>>2)
    the Answer will be 2.
    mam you are good teacher thnks for your healping.

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

      Let's break down the expression and the code to understand the values of `a` and `b`.
      ### Code Analysis:
      ```c
      int b, a = 2;
      b = (a++, ++a, a >> 2);
      printf("%d
      ", a);
      printf("%d", b);
      ```
      1. **Initialization**:
      ```c
      int b, a = 2;
      ```
      Here, `a` is initialized to 2, and `b` is declared but not initialized yet.
      2. **The comma operator**:
      The comma operator `(a++, ++a, a >> 2)` evaluates each expression from left to right, but only the **rightmost expression** (`a >> 2`) is the value assigned to `b`.
      So let's evaluate the comma operator step by step:

      - **`a++`**: This increments `a` after its current value is used. So, in this case:
      - `a` is initially 2.
      - `a++` uses the value 2 but increments `a` to 3.
      - **`++a`**: This increments `a` before using its value. After `a++`, `a` was already incremented to 3, so now `++a` increments `a` to 4.
      - **`a >> 2`**: After the previous two operations, `a` is now 4. The expression `a >> 2` means a bitwise right shift of `a` by 2 positions. Shifting 4 (binary `100`) right by 2 positions gives `1` (binary `001`).
      **So, `b = 1` because `a >> 2` results in 1**.
      3. **Final value of `a`**:
      After the comma expression, `a` is left as `4`.
      4. **`printf()` statements**:
      - `printf("%d
      ", a);` will print the value of `a`, which is `4`.
      - `printf("%d", b);` will print the value of `b`, which is `1`.
      ### Summary:
      - **The value of `a`** is `4`.
      - **The value of `b`** is `1`.
      ### Output:
      ```
      4
      1
      ```

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

    Ma'am I like ur video very much the English language you used is very easy and understandale to me mam you are awesome👏✊👍 mam from where you did your graduation?
    Which books you studied and please also reccomend us book

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

    madam thanks i cleared my concept..,post and pre for inc and dec..

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

    #include
    int main()
    { int a;
    a=printf("jenny"),2,3;
    printf("%d",a);
    return 0;
    }
    /*output : jenny5
    Mam here I got jenny along with 5 I think we are using format specifier %d and data type int...so it give the length of the string */

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

      Bro, for me its coming like "code has no effect "

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

      put bracket for a=(print("jenny),2);

    • @Thejasree...
      @Thejasree... 9 หลายเดือนก่อน +1

      Yeah,if we don't use printf("%d",a) ,we will get the output as jenny

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

    Outstanding ...from pakistan

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

    12:10 how a++ becomes 9 ?
    It is a post increment na so 8 should be assigned na 🤔🤔

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

    For a=8
    b=(a++,++a,a>>2)
    b=a++,++a
    Output is b=2
    a=10

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

      why the value of a is 10. please tell me because after evaluating a>>2 expression it's value is 2 i.e., is returned to b. so, a value will also be 2 only. why it is 10? please answer me.

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

    ❣❣❣explained in easy way❣❣

  • @JayPatel-ou2ud
    @JayPatel-ou2ud 2 ปีที่แล้ว +3

    Nice explanation thanks mam 🙏🙏

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

    a=10
    b=2
    a value doesn't change,
    b value will be a/2²
    =10/4
    =2

    • @rohithsai9046
      @rohithsai9046 3 ปีที่แล้ว

      can you explain in detail please😕

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

      @@rohithsai9046
      We have a=8, b.
      Q. b=(a++,++a,a>>2);
      As per video b will take value of last operant i.e a>>2
      but first two operant will evaluate from left to right.
      First a++. a become 9
      Then ++a. a become 10
      in a>>2
      We use shortcut like
      If >> operater is used divide (/) value a with given value 2²=4
      If these operater square the value of given number).
      In our case >> this operater is used so
      b= (10/2²)
      b= 10/4
      b= 2
      b gets value 2 because we are using int as our datatype,
      *If we use float then b value change to 2.5.
      (We can't use float if we are using bit/shift operators)

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

      @@sankalpphadke4938 hi sir
      I agree with answer
      But can you tell me which has more precedence ++ or >>

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

      @@akhilsugaraju3905 ++

  • @luckybanthia
    @luckybanthia 3 ปีที่แล้ว

    you have solved my doub't... i'm gathering here and there for the answer but didn't get
    int a= (2,7,9) o/p = 9....*but finally i got my answer.. thank you mam*

  • @justcode......2254
    @justcode......2254 2 ปีที่แล้ว

    13:56 value of a is 10 and b is 2

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

    Tq mam have a great job

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

    Sbse phle hmne dekha aur seekha

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

    If we print a value also then
    Output :
    Jenny
    5
    As there are 5 letters are their in word "Jenny"

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

    14:11 output is a=10,b=2

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

    If i can take you to the moon and stars i should have done that 🙂, thanks mam, you made it easy for us.

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

    Mam ur DS playlist really helped me a lot for exam prep... please make a playlist for Computer architecture also mam... the subject sounds so vague pl help mam... 🙏🙂

  • @PavaniGummadipudi-ot7kn
    @PavaniGummadipudi-ot7kn 8 หลายเดือนก่อน

    Thank you mam for your kind information for c programming tutorials thanks a lot mam

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

    Ma'am I had a doubt..!???
    b=(a++, ++a, a>>2); in this equation
    b=2 is the answer...!! But the value stored in the A change in each stage.
    a++ = 9
    ++a = 10
    a>>2 = 2
    So my doubt is the new value stored in the A=2, so I think it couldnt be 10.
    So the value be
    B=2 , A=2
    Plzz give reply....

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

      Let's break down the expression and the code to understand the values of `a` and `b`.
      ### Code Analysis:
      ```c
      int b, a = 2;
      b = (a++, ++a, a >> 2);
      printf("%d
      ", a);
      printf("%d", b);
      ```
      1. **Initialization**:
      ```c
      int b, a = 2;
      ```
      Here, `a` is initialized to 2, and `b` is declared but not initialized yet.
      2. **The comma operator**:
      The comma operator `(a++, ++a, a >> 2)` evaluates each expression from left to right, but only the **rightmost expression** (`a >> 2`) is the value assigned to `b`.
      So let's evaluate the comma operator step by step:

      - **`a++`**: This increments `a` after its current value is used. So, in this case:
      - `a` is initially 2.
      - `a++` uses the value 2 but increments `a` to 3.
      - **`++a`**: This increments `a` before using its value. After `a++`, `a` was already incremented to 3, so now `++a` increments `a` to 4.
      - **`a >> 2`**: After the previous two operations, `a` is now 4. The expression `a >> 2` means a bitwise right shift of `a` by 2 positions. Shifting 4 (binary `100`) right by 2 positions gives `1` (binary `001`).
      **So, `b = 1` because `a >> 2` results in 1**.
      3. **Final value of `a`**:
      After the comma expression, `a` is left as `4`.
      4. **`printf()` statements**:
      - `printf("%d
      ", a);` will print the value of `a`, which is `4`.
      - `printf("%d", b);` will print the value of `b`, which is `1`.
      ### Summary:
      - **The value of `a`** is `4`.
      - **The value of `b`** is `1`.
      ### Output:
      ```
      4
      1
      ```

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

    a,b=2 , as ++ is having more presedence then >> , the number would be 10, in binary 1010 >>2= 10 (i.e 2)

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

    b=(a++,++a, a>>2)
    a=10 and b=2

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

      hi

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

      why the value of a is 10. please tell me because after evaluating a>>2 expression it's value is 2 i.e., is returned to b. so, a value will also be 2 only. why it is 10? please answer me.

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

    11:45 output is Jenny
    😂😂

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

    a = 4
    b = 2
    Right answer !

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

    11:43 it counts letters
    So there are 5 letters in jenny then
    O/P is:-
    Jenny5
    Is it right?

    • @food8814
      @food8814 3 ปีที่แล้ว

      same output is coming

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

      Is that an error?? Jenny is not an integer... So how???

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

    Mam please make video on recursion . It will really help in understanding ds

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

    Answer is 2.
    For b=(a++,++a,a>>2)

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

    Mam for b=(a++,++a,a>>2);
    The value of b=2
    The value of a=10
    Thank you mam

    • @SN-edits4u
      @SN-edits4u ปีที่แล้ว

      No, a also updates it's value as a>>2

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

      why the value of a is 10. please tell me because after evaluating a>>2 expression it's value is 2 i.e., is returned to b. so, a value will also be 2 only. why it is 10? please answer me.

    • @Liam-10
      @Liam-10 ปีที่แล้ว +2

      @@leaderrr_shivam
      For a it will be 10 because it works with each value but for b it will be only 8 because it works only with last value and after shifting right it will become 2 .
      For a:-
      int = 8;
      a++ = 9;
      ++a = 10;
      For b:-
      int a = 8; in binary it means 00001000
      And a >> 2 means that we'll eliminate the first 2 bits and then it will be 00000010 = 2 in decimal ✅👌

  • @alone0.722
    @alone0.722 ปีที่แล้ว

    09:58 mam the right answer in 4

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

    a = 10;
    b = 2;
    printf("Thanks jenny");

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

      why the value of a is 10. please tell me because after evaluating a>>2 expression it's value is 2 i.e., is returned to b. so, a value will also be 2 only. why it is 10? please answer me.

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

      @@leaderrr_shivam lets take the question:
      int a = 8, b;
      1.b = (a++, ++a, a>>2)
      solution;
      here the comma acts as an operator and its associativity is from left to right:
      therefore from the question a= 8;
      a++ is a post increment operator (i.e the original value of a ( which is 8) will be executed and after execution it will increase to 9.
      ++a is a pre increment operator so the value of a(which is now 9 from post increment) will be increased to 10 during execution;
      a >> 2 = 10 >> 2; = 2.5 but remember the a is an integer so only the value 2 will be printed,
      hence a >> 2 = 2;
      i hope this explanation helps;

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

      @@devSackey okay bro. thanks

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

      @@leaderrr_shivam Always welcome bro

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

    First 😍

  • @Liam-10
    @Liam-10 ปีที่แล้ว

    Thank you so much Ms Jenny ☺️❤️

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

    Thanks a Lot Mam

  • @rukayatmuhammed3670
    @rukayatmuhammed3670 ปีที่แล้ว +5

    int a = printf("jenny"), 2, 3, 4
    Solution:
    Here, It is an error, but [printf("Jenny")] will still be executed, which results in the output of [jenny5], because the world [Jenny] has 5 characters... So output will be [Jenny5]
    Thank you ma'am

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

      where did the 5 came from???

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

      ​@@makrynub9256its the number of character used inside the printf function printf("Jenny")

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

      ​​@@dianawanguiw3669why it will be printed... I think only "jenny" will be printed 😐there's nothing to give the character count.. 😐

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

    b = 2 finall result ma'am. Since a++ and ++a will be operated and rejected then the a>>2 will be assigned to be,

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

    Iam going to follow u mam

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

    int a=printf("jenny"),2,3,4; output=> Error because in initialization without bracket, it acts as separator
    b=(a++,++a,a>>2); output=> 2 ; a has 10, b has 2

    • @k.annpurnamma3357
      @k.annpurnamma3357 3 ปีที่แล้ว +2

      Sir You have a youtube channel right
      Please upload your doughts in c program and also what you written

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

      Its not showing error

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

      Hlw, in mam question it is not assigned with character so output will be only jenny

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

      It will print Jenny

  • @jayeshkoli3876
    @jayeshkoli3876 4 ปีที่แล้ว

    11:40
    output is - jenny 2
    jenny didi please like if o/p is right.

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

    Thank you ma'am ❤️❤️.

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

    Waiting for next video ,mam

  • @VikasKumar-xu8if
    @VikasKumar-xu8if 3 ปีที่แล้ว

    14:00 ans a=2 b=2

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

    Mam please 🙏 complete the playlist of DAA as soon as possible
    🙏🙏🙏🙏🙏🙏🙏

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

    I like your teaching syle, now falling love to u🤘

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

    11:38 output will be
    Jenny5

    • @RiteshKumar-pu3gp
      @RiteshKumar-pu3gp 2 ปีที่แล้ว

      5 q hoga?

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

      why not just jenny without the '5'

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

      ​@@muhammedibrahim5421Because the variable 'a' is of integer type, it will store an integer that represents the number of characters it has printed. Jenny has 5 characters

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

    When int a=(5,4);
    Output will be 4, then why to put 5 in the first place? What's the use of it?

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

    a = printf( "jenny" ),2,3,4;
    Answer a= 4

  • @mohammedsahilkhan2195
    @mohammedsahilkhan2195 3 ปีที่แล้ว

    Mam at -8:23 Jenny
    4

  • @venup5381
    @venup5381 3 ปีที่แล้ว

    14:02
    a=10
    b=2

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

    11:43 error duh

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

    Dear Mam good Morning, i have executed the statement :

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

    Mam please do make a video on functions in c

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

    Main{
    int a=0,b=0;
    a=(b=75)+9;
    printf("%d,%d",a,b)
    }
    Can you explain above what output we will get

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

    Dear Ma'am need your help for data analytics, If the video has already been made by you, i will appreciate if you can share the link with me or please advice the schedule once you plan to upload the tutorial video. Furthermore, requesting you to please complete the DAA tutorial playlist.
    Looking forward for your guidance
    Thanks!

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

    Wishing happy New year & G B Y TO TEACHER

  • @Liam-10
    @Liam-10 ปีที่แล้ว

    int a;
    a = jenny , 2 ,3 ,4;
    a = jenny;
    Because without brackets we get the first value

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

    Ma'am pls object oriented programming k upar v video banaiyi 🙏🙏🙏

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

    Hello mam,i am 1st yr cse student at nit warangal. Mam, i have 2 yr gap bewtween 12th and start of btech. 1yr complete drop and 1 yr partial drop from nit jalandhar mechanical. Mam, how will it affect my placement? Pls help🙏🙏

    • @ashishkumar-fd4gp
      @ashishkumar-fd4gp 3 ปีที่แล้ว +2

      yes but don't loose hope ....all the best for your future

  • @ShubhamKumar-tf7qi
    @ShubhamKumar-tf7qi 6 หลายเดือนก่อน

    10:10 output will be jenny 5

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

    11:30
    a =printf("Jenny
    "),2,3,4;
    mam out of this is showing 6.
    How i didnt understand.

  • @aditiraj8147
    @aditiraj8147 4 ปีที่แล้ว

    Ma'am ans of a=printf("Jenny"),2,3,4;
    Will be Jenny234. & Ans of b=(a++,++a, a>>2) will be 2

  • @swapniljadhav9494
    @swapniljadhav9494 3 ปีที่แล้ว

    a =10
    b=2
    14:00

  • @Rohan-21
    @Rohan-21 4 ปีที่แล้ว +2

    Hi,
    You initially said that first operand i.e. 5 will be rejected and second operand 4 will be returned. But then again you said 5 will be printed.

    • @Rohan-21
      @Rohan-21 4 ปีที่แล้ว

      Got the doubt cleared. Thanks for the explanation.

    • @ashishmaurya3409
      @ashishmaurya3409 4 ปีที่แล้ว

      th-cam.com/video/N9Vip-uWyQQ/w-d-xo.html

    • @swetakumari6641
      @swetakumari6641 3 ปีที่แล้ว

      I also get this confusion?

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

      I think she's meaning when there''s a brackets then will return rightmost value but if there are not brackets left value will be return

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

    a = printf("Jenny"), 2,3,4;
    Answer is Jenny
    b = (a++, ++a, a>>2);
    value assigned to b will be a>>2 which in the end is 2, value of a is 10

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

    Excuse me mam in ur channel, there is programming,DAA,DBMS,data structure,and algorithms,dynamic programming,os, which is priority to watch first and to learn...??

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

    Mam please start c++ language after c mam🙏🙏🙏 btw happy New year 🎉🎉🎉

  • @nikhilbhardwaj9000
    @nikhilbhardwaj9000 3 ปีที่แล้ว

    mam plzz make lectures in hindi too i learn fast with hindi explaination

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

    #include
    void main()
    {
    printf("
    %d %d %d",printf("A"),printf("BB"),printf("CCC"));
    }
    OUTPUT
    CCCBBA
    1 2 3
    Madam, can you please explain why the printf statements are executed from right to left. But when I write the following code
    #include
    void main()
    {
    if(printf("A"),printf("BB"),printf("CCC"))
    ;
    }
    Output is "ABBCCC".
    I am not understanding.

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

    10:05 why is my output like the below mentioned way
    Jenny
    6

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

    Upload the next lecture also mam...

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

    Printf ("Chetan")2,3,4;
    Value will be 6

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

      how its evaluating the string like that ???

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

    if a = 5,4 then compiler doesnot give error but takes it as a=4.

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

      No bro it will take a as a=5,,, can u check once's

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

      @@vineethkumar9841 I checked, and the GCC compiler gives error. when same variable is initialized using comma. Only different variables can be initialized

    • @Liam-10
      @Liam-10 ปีที่แล้ว +2

      if you're writing it like this int a = 5,4; it will get error
      but like these int a = (5,4); ✅
      int a;
      a = 5,4; ✅
      It won't give you any errors

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

      @@Liam-10 Yes, using brackets don't give error that's because brackets have highest precedence than comma.

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

      If you write like this int a = 5,4;
      printf("%d",a) It will give error but if you declare first and then to use for example int a ,b;
      a = 5,4 it will output 5

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

    Output :
    a=10
    b=2

    • @rohithsai9046
      @rohithsai9046 3 ปีที่แล้ว

      hey, can you explain a bit please🥺

    • @Dunniio
      @Dunniio 3 ปีที่แล้ว

      @@rohithsai9046 b = (a++,++a,a>>2)
      At a++ , a will be 9
      At ++a , a will be 10
      At a>>2 , 10/2^2 = 10/4 which will be 2.5 but only 2 will be returned
      So a=10 and b=2

  • @venup5381
    @venup5381 3 ปีที่แล้ว

    11:45
    output is jenny

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

    thanks 💛💛💛

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

    Mam will u give the notes. keep that notes pdf in description pls 🙏

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

    Please do vedios on python programming please 🙏🙏🙏🙏

  • @prashantchauhan5783
    @prashantchauhan5783 4 ปีที่แล้ว

    Very good 👍

  • @shishtsharma4330
    @shishtsharma4330 3 ปีที่แล้ว

    in equation
    int a=8,b;
    b=a++,++a;
    mam you said first assignment operator works bur we know that pre increment(++a) priority or precedence is high so why assignment operator works first

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

      Assignment operator is higher priority compaire to pre increment (++a).

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

    14:05 a = 2

  • @hareeshkumar9554
    @hareeshkumar9554 3 ปีที่แล้ว

    a=10,b=2 i get mam..tq mam

  • @SaiKrishna-wz3ld
    @SaiKrishna-wz3ld 2 ปีที่แล้ว

    14:10 b=2 a=10

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

    very nice ma'am 😊

  • @HariRam-ik8xz
    @HariRam-ik8xz 3 ปีที่แล้ว +2

    a=2
    b=2
    Results

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

    Mam, when will come lecture of statement and looping?