Comma Operator in C

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 ธ.ค. 2024
  • C Programming & Data Structures: Comma Operator in C
    Topics discussed:
    1. What is the Comma Operator?
    2. Use of Comma Operator as the separator.
    3. Use of Comma Operator as an operator.
    4. Precedence of Comma Operator.
    5. Examples based on Comma Operator.
    6. Homework on Comma Operator.
    C Programming Lectures: goo.gl/7Eh2SS
    Follow Neso Academy on Instagram: @nesoacademy(bit.ly/2XP63OE)
    Follow me on Instagram: @jaspreetedu(bit.ly/2YX26E5)
    Contribute: www.nesoacademy...
    Memberships: bit.ly/2U7YSPI
    Books: www.nesoacademy...
    Website ► www.nesoacademy...
    Forum ► forum.nesoacade...
    Facebook ► goo.gl/Nt0PmB
    Twitter ► / nesoacademy
    Music:
    Axol x Alex Skrindo - You [NCS Release]
    #CProgrammingByNeso #CProgramming #CommaOperator

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

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

    Thank you sir for providing c lectures for free. When many coachings are asking hefty amount for teaching the same thing you are providing this for free. Thank you to the creator of neso academy.

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

      Same words from me to sir

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

      shouldn't internet be used for that, free education?
      unfortunately no, at least for now

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

      @@opst1704 I mean compared to online classes u pay both for money and the class fee or whatever is that

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

      @@opst1704 let's just say this is a free course, but u provide the internet

    • @Gojohatake-rz5ko
      @Gojohatake-rz5ko 11 หลายเดือนก่อน

      this academy will also require money to teach advance c program when entering files😢😢

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

    He ( , ) was underrated,
    But u (neso ac.) brought him into lime light!!
    Respect!!

  • @purushothamchembeti8606
    @purushothamchembeti8606 6 ปีที่แล้ว +379

    ans: 50;
    given num = (var=15, var+35), then initially var =15 was evaluated and the second operand becomes var+35 == 15+35 which results 50. now 50 will be printed.

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

      👍👍

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

      @Nadeem Afzal it will not give an error, the answer is 50

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

      @Nadeem Afzal since plus has higher precidence than assignment operator first it evaluates plus expression and assign it to the variable

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

      yeah yr correct

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

      @Nadeem Afzal
      nizar@nizar-X540LA:~$ cat try.c
      #include
      int main(void){
      int var;
      int num;
      num=(var=15,var+35);
      printf("%d
      ",num);
      return 0;
      }
      nizar@nizar-X540LA:~$ ./try
      50
      nizar@nizar-X540LA:~$

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

    Litreally gold series .
    You will pay 3000-4000 rupees in offline coaching classes and then they will teach you with so much minute details .
    But Neso is teaching , for free of cost .
    Geeksforgeeks for C is good , but they teach theory more .
    Hence geeksforgeeks can be used for note making and then simultaneous examples can be studied from here for practical knowledge .
    Thank you very much neso .

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

      Also not everyone is comfortable in just reading the GFG articles rather vedios are more engaging than mere reading !!!

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

      @@sohamshinde1258 Read from gfg and watch the videos from neso .
      gfg gives very minute details also .
      Can we assign address of a register variable to a pointer ?
      The answer is no .
      So these are some minute details , and if you are not knowing these minute details , then it will cause a problem .
      Hence gfg is good for full understanding , visit each and every link , of gfg and read those and make notes .
      Also you can watch the videos of neso also , they are also pretty good .

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

      Hmm

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

      Hii what is gfg and how can i use..... Hlp me

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

      @@poornachandra3138 @gfg - Computer Science portal for geeks. It contains well written, well thought and well explained computer science and programming articles .... I prefer notes there.....

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

    The output is : 50.
    Thank you so much, sir, for your such kind of efforts. Your explanation is the best for me so far.

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

      How?

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

      ​@@am_gonnadomeproud
      In the num line, the var variable = 15 gets evaluated first, but it is rejected because , is working as a separator and bracket has the highest presidents here . Then Returns variable + 35 to num variable. Var variable has the value 15 stored inside. So num is 15 + 35 = 50. Then num is printed which is 50. Thanks

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

    my logical thinking gets increased through this awesome course

  • @Fred1989
    @Fred1989 6 ปีที่แล้ว +18

    1:10 Yes, can be used as a seperator, not for pointers though, haven't seen a video where you teach pointers yet though so maybe you'll mention it there, it's a pitfall I've seen a lot of people make though so worth mentioning.
    example:
    int *a, b,c; // Only 'a' is a pointer the rest are ints
    int *a, *b, *c; // All are pointers

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

    Output = 50
    num = (var=15, var+35),
    i.e var =15 (First expression in the bracket and "assignment" operator takes precedence over "comma" operator, hence var is assigned a value of 15)
    next:
    var+35 = 15+35 i.e 50.
    next:
    num will be assigned the value of 50 as var=50 (rightmost operand within the bracket)

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

    The output will be 50. Because "," is used as operator and due to which the rightmost operand's value is considered which is var+35. and also var=15 is also evaluated but rejected at last due to this evaluation the var is initialized to 15.

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

    Never saw the concepts that nesoacademy guy explains in any videos that i've watched .

  • @muktadir-us-saleheen9133
    @muktadir-us-saleheen9133 4 ปีที่แล้ว +29

    I really like your way of teaching. I also recommend my friends to watch the videos of Neso Academy. Cordial thanks to you. From Bangladesh.

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

    I'm loving your c programming language series and I suggested it to my classmates. You have done a great 👏 work, thank you sir 😊

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

    50 is the answer because as brackets are present , comma acts as operator. Therefore, initially the first one is evaluated and becomes var+35 which is 50...

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

    Before neco academy:'c' programming is hard to learn
    After neco academy :'c' is very simple programming language to learn
    All this credits goes to NESO ACADEMY 😊

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

    Thanks!

  • @NaveenKumar-yj7oh
    @NaveenKumar-yj7oh 5 ปีที่แล้ว +13

    Thank you from the bottom my heart sir that as due to financial problems i'm not learned c but because of you this happened

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

    Just excellent...much much much more than paid courses...........never found this things about comma operator
    may God bless you more

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

    Ans:50
    After solving this expression num= (var=15,var+35);
    var =15 bcz it simply evaluate the 1st operand and assign the 2nd operand as he explained in the video so num=var+35.
    So final ans is num=50

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

    Appreciate for the course sir, people are asking for tons of $ for even the basics and here you are doing it for free. Reccomended to my classmates and my best friends starting C also :D

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

    answer =50
    as the brackets are the highest precedence then (var=15,var+35) will be taken to consideration first
    as comma is the lowest precendence then assignment of the value 15 will be evaluated var=15 and the addition of 35 will be evaluated later but as we know the compiler ignores the first argument and return the second argument to num
    therefore num=50 wich will be printed later.
    note : if we erase the brakets num=var=15,var+35 then comma will be a separator and num will get the value 15

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

    this is seriously an awesome explanation, i'm enlightened

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

    num= (var = 15, var+35);
    1. var =15
    2. var+35 which is equal to var = var + 35
    3. var = var(which is 15) + 35
    4. var = 50

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

    I really impressed your way of teaching sir.I learnt so many new topics in C language by following this channel......

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

    Within brackets assignment operator is used so first var = 15 is executed and then var is added with 35 then with comma operators store 50 in num then num get printed

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

    1 st priority is the bracket, next, = operater have higher precedency than comma operator, so initially var=15 evaluated, then comma operater evaluated, so num=15+35,
    So the output is 50

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

    In the last homework question there are 2 operands imside the bracket so the last operand will be calculated but the first operand will evaluated and then rejected..so after evaluation the value is 15 and then var+35=50 after that var value will be rejected and only num value will be printed which is 50

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

    The output is 50. Thanks for providing quality content.tq neso academy

  • @selvalakshmis.v4232
    @selvalakshmis.v4232 3 ปีที่แล้ว

    50.
    Reson: 3:09
    Thank you, Sir

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

    i read many articles without understanding until i watched this video you described with easy to understand definitions next to illustrations, thanks, hope you do more topics on machine learning and computer science, and math

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

    the answer will be 50. the first expression var=15 will evaluted then rejected and then the rightmost value will be printed.

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

    Awesome explanation 👌👌👌👌👌👌👌👌👌👌👌

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

    Your way in teaching is awesome , thank you

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

    Comments for myself: The comma can be used as an operator. It will return only the rightmost operand in the expression while evaluating the rest of the operands. Comma operator have the least precendence among all operator, hence it will be evaluated last. Comma can be a separator or an operator. With parentheses, you can make it work like an operator. As for the assignment, the answer is 50 because we used parenthesis hence comma will be an operator here. Then, the expressions are evaluated from left to right, and finally the result of the rightmost expression is stored to variable num and printed.

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

    Sir you really are doing an awesome job by providing such good content and that too free .Please keep continuing such great work.

  • @KuldeepSingh-tq4pd
    @KuldeepSingh-tq4pd 4 ปีที่แล้ว

    Neso academy is best and all of the faculties are also good.way of teaching really awesome..love u Neso Academy

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

    ans=50 num=(var=15,var+35)
    first var=15 then 15+35

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

    The depth n details by jaspreet sir is awesome

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

    Perfect explanation thank you....

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

    Thanks neso for wonderful explanation of c language ❤❤

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

    This channel is just amazing 👍👍

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

    Great effort! May God bless Neso 🥳😍

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

    I am amazed I studied whole C language and I was unaware of these things....*modi accent* main hairaan hoo....

    • @anujsharma8938
      @anujsharma8938 5 ปีที่แล้ว

      pl name the video in which size of operator is coverd ............

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

    Sir i humble request you . . . That. . . .please upload java and c sharp language videos. . . .or any object oriented programming language videos. . ..

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

    Teaching at it's utmost perfection

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

    Ans of the hw ques is 50 , bracket will open first => num = var = 15 , num = var +15 as , act as seperator therefore both statement asct as differert => num = 50

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

    Sir, you have mentioned there.
    Comma simply evaluates the great of the operands and finally reject them.
    We got the output hello! 3:30, then where is the question of rejecting sir.

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

      i think you have misunderstood it .
      Here reject means that it did not assign the other operand to the variable but executed them.
      it only assign the most right operand.
      here the first operand printf("%s
      ","Hello") is executed but not assigned to the variable.
      the most right operand 5 is assigned .
      Hope your doubt is clear

  • @greywolf271
    @greywolf271 6 ปีที่แล้ว +36

    Funny how after years of programming you forget that "," is an operator and just use it instinctivley

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

      I was surprised a bit, when I realised that. I thought that I would skip over the operators section in these lectures.

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

    The next level of teaching

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

    Addicted to the playlist... It's awesome

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

    _
    s1. braces got higher precedence.
    s2. inside the braces, "+" got higher precedence. So, var which is 0 by
    default added 35.
    s3. next turn is of "=" which is inside the braces of course.
    s4. they make var = 15.
    s5.now the least precedence of ",". So, according to this, it returns 35 to num and
    evaluates var = 15.
    s6. now the turn is of "=" (outside the braces).
    s7. now every operator has done its job so var = 15 and comma will add 15 with 35 and
    return it to num. which is 50.is my assumption correct?

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

    Jazakallahu khairan, brother...

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

    thanks sir for this greatfull and important lecture..

  • @shrutisoni7354
    @shrutisoni7354 6 ปีที่แล้ว +24

    Sir ap bhi to kabhi bataya kro ki really me konsa answer sahi hota h

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

      pl name the video in which size of operator is coverd ............

    • @asmitach6
      @asmitach6 5 ปีที่แล้ว

      @@anujsharma8938 lec 6

    • @indiancoder8301
      @indiancoder8301 5 ปีที่แล้ว

      Try on compiler

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

    I will donate to you.. for sure.. when i have enough to return your service... Sir, No harms comes to a goodman either in life or in death...

  • @rakeshraj688
    @rakeshraj688 6 ปีที่แล้ว +11

    b)50

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

    🎉🎉🎉 wow great sir ur lecture is wonder ful. thank u so much.for making such a good video for us

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

    int a;
    a=(3, 4, 8);
    printf("%d", a);
    result=8 because...
    the first operation comma operator does is a=3;
    second is a=4; and
    third is a=8;
    so, at last the value 8 is stored in variable a.

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

    50.....evaluate and print rightmost

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

    50 will be the Answer!
    Initialy first operand will be evaluated, which assign 15 to var variable, then second operand get evaluated, here value of var variable is 15 plus 35 which gives out 50 which will be assigned to num variable and get printed..
    😊

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

    Perfect explanation. ❤️❤️❤️💯
    Thank you so much. 🙏🏽

  • @mehedih.sourov2383
    @mehedih.sourov2383 2 ปีที่แล้ว +1

    Love you Neso Academy.....You are important more than my GF

  • @winter.k.mwanza9932
    @winter.k.mwanza9932 2 ปีที่แล้ว

    ans 50
    Thank you. great work

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

    The ans is 50 because ( ) has higher precedence than outer =. But again inside ( ) we have two operations and though +
    has higher precedence than = they are separated by comma hence according to the rule operations inside ( ) will get evaluated from left to right hence first var=35 then var+15=50

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

    50 is the output

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

    Tq neso academy...gave an uncountable knowledge
    Output is 50

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

    Thank you sooo much sir for providing this course.

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

    Thanks so much sir for providing such wonderful series...🙏🙏

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

    Sir plz upload some more programming languages video lectures......

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

    Output :15, Because,in brackets there is also assignment operator , which is having greater precedance than comma operator. So it just evaluate First operand n rejects the nxt one..

    • @krishintown5645
      @krishintown5645 5 ปีที่แล้ว

      Great understanding 👏

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

      There is + too...which has the precedence greater than =

    • @apurvalohreh2698
      @apurvalohreh2698 5 ปีที่แล้ว

      answer will b 50.

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

    num = (var = 15 , var+35);
    now, var+35 ;
    we know that is already declared var = 15;
    so,
    15+35 = 50;
    therefore output will be 50✅

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

    What a lecture sir, thank you😊

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

    YOUR CHANNEL IS THE 🐐

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

      CAN U TEACH C++ SIR

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

    I read in k&r the programming language book that "the commas that separate function arguments, variables in declarations, etc, are not comma operators, and do not guarantee left to right evaluation" so are they? or are they not?

  • @hamzaalouane-w1l
    @hamzaalouane-w1l ปีที่แล้ว

    tanks for all information and i think the right answer is b the output is 50

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

    the answer of the question is 50

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

    Ans is 50 therotically as well as on compiler

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

    here the answer is 50.
    because, here num=(var=15,var+35);
    brackets has the highest precedence after that there is assignment operator, so var=15,
    then comma acts as a separator not an operator as there was assignment operator before;
    so var+35 = 15+35 = 50 so 50 is assigned to num
    and finally 50 is printed...................

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

    The output is 50 and thank you neso academy ❤️👍

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

    num=(15,50);
    Output:50

  • @navyabondala-t1g
    @navyabondala-t1g 9 หลายเดือนก่อน

    Answer for homework problem is 65(i.e., integer value of (A)). As the condition sizeof(var) is true that is 4(other than 0). Is it correct @Neso Academy.

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

    Ans - 50 ☺

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

    1 st value of var becomes 15 and then after executing var+35 var becomes 50 ie: num=(15,50) therefore ans is 50

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

    the answer is 50 .
    .bracket has highest precedence then within bracket assignment operator has more precedence then coma.

  • @playstore-hp1vk
    @playstore-hp1vk 5 ปีที่แล้ว

    very nice and clean lecture . I like it

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

    Grateful to you sir 💖💖💖💞

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

    Nice explaination...

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

    output is 50

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

    ans-50 because the first expression evaluated then second becomes 35+15=50

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

    first evaluate the left hand side expression,
    then evaluate the right hand side expression,
    finally return the result of the evaluation of the right hand side expression.
    it doesn't matter what is the precedence inside the bracket, It will simply work as mentioned above.
    Listen to Neso Academy carefully, He just said what I mentioned above.
    You will get simply 50 as HW answer. Thank You.

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

    Why var = 15 will be evaluated first??

  • @anandkumar-bd2ru
    @anandkumar-bd2ru 2 ปีที่แล้ว

    50, num = var + 35 and simplifcation of remainibg part , var =15

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

    Hats off neso academy

  • @sagorsarder831
    @sagorsarder831 5 ปีที่แล้ว

    Ans : 50

  • @moinkhan-xd6pe
    @moinkhan-xd6pe 3 ปีที่แล้ว

    application / program of using comma ?

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

    so the answer will be 50 because as it is written there that var=15 then var +35 and it is all under num so we have the value of var that is 15 then var +35 that is 15+35 = 50 and it is under num so num = 50 that is our output

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

    #include
    int main()
    {
    int a=1010;
    a++;
    int var=(5,printf("%d",sizeof(a)));
    printf("
    %d",var);
    return 0;
    }
    output: 4
    1(why here 1 is printed after 4 in output?)

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

    Wow nice one 👍

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

    the answer is 50;
    explanation: given num = (var=15,var+35),var + 35 = 50;
    now 50 will be printed

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

    What is 'enum'?