C_31 Switch Statement In C | C Programming Tutorials

Sdílet
Vložit
  • čas přidán 11. 01. 2021
  • In this video, I have discussed the Switch Case in C with a flowchart and program.
    Best C Programming Tutorials : • Programming in C
    *******************************************
    Connect & Contact Me:
    My Second Channel Link: bit.ly/354n7C7
    Facebook: / jennys-lectures-csit-n...
    Quora: www.quora.com/profile/Jayanti...
    Instagram: / jayantikhatrilamba
    Twitter: / khatrijenny
    *********************************************
    More Playlists:
    C++ Programming Tutorials: • Lec 1: How to Install ...
    Placement Series: • Placements Series
    Data Structures and Algorithms: https: • Data Structures and Al...
    Design and Analysis of Algorithms(DAA): • Design and Analysis of...
    Python Full Course: • Python - Basic to Advance
    Printing Pattern in C: • Printing Pattern Progr...
    Dynamic Programming: • Dynamic Programming
    Operating Systems: // • Operating Systems
    DBMS: • DBMS (Database Managem...
    #cprogramming #jennyslectures #programming #clanguage #switchcase

Komentáře • 383

  • @Sourabh2208
    @Sourabh2208 Před rokem +45

    #include
    main()
    {
    int marks;
    printf("Enter marks ");
    scanf("%d",&marks);
    switch (marks/10)
    {
    case 10:
    case 9:
    case 8:
    printf("Grade A");
    break;

    case 7:
    printf("Grade B");
    break;

    case 6:
    printf("Grade C");
    break;

    default: printf("Grade D");
    }
    }

    • @p.pardhu_akhil
      @p.pardhu_akhil Před 2 měsíci +4

      That's wrong program, when you try to enter the marks. 9 the output is coming great d.
      here is the correct program;---
      #include
      int main()
      {
      int a;
      printf("Enter a value:");
      scanf("%d",&a);
      switch (a)
      {
      case 10:
      case 9:
      case 8:
      printf("Grade A");
      break;
      case 7:
      printf("Grade B");
      break;
      case 6:
      printf("Grade C");
      break;
      default: printf("Grade D");
      }
      return 0;
      }
      mam pls check and tell... tq..

    • @venugopalala
      @venugopalala Před 2 měsíci +2

      Both are correct
      1 st code marks for 100 i.e;user would have to enter marks for 100
      2nd code marks for 10
      i.e; user would have to enter marks for 10

  • @Rakshith_._247
    @Rakshith_._247 Před 3 lety +93

    This ma'am is the best. She does so much for us. Love to her and her family and the little one.

  • @oppositelyharish947
    @oppositelyharish947 Před 2 lety +65

    How many members are skipping unacademy add

  • @nitish2001nb
    @nitish2001nb Před 3 lety +47

    i know it's very difficult to make videos daily along with family and explain topics in detail
    thank you mam for making these videos
    i mean all of them that u made
    🙏🙏🙏🙏 🙇🙇🙇🙇
    i didn't go to a good college
    but i found a teacher like you now i can learn all the concepts from your CZcams channel🙏🙏

  • @sbepari79
    @sbepari79 Před 3 lety +105

    Once this is finished can help us to create a live project using c++/c language it will help us for better understanding 🙏🏻

  • @gopalchaudhary6170
    @gopalchaudhary6170 Před 2 lety +10

    One of the best series of programming in C language ❤️❤️❤️❤️

  • @tech3047
    @tech3047 Před 2 lety +6

    Mam you have been helping me too much with your videos.
    The way you explain is very easy to understand i have only to say thank and ask you please don't stop making video such that, you may not know but your videos are very useful for us.
    by the way i am from Mozambique

  • @Rishithabajjuri
    @Rishithabajjuri Před 2 lety +9

    Excellent teaching skills u have mam that is understanding by everyone ❤️😍😍😍

  • @Mr.Yaragonda
    @Mr.Yaragonda Před 3 lety +6

    I love❤ this Sessions....... Thank you❤🌹 so much madam from bottom of my heart💖....... You are the only one in CZcams▶️i always waiting⏳ for ur videos madam......... Ur hardworking never wastes😇....... My education🎓 is dedicated always for you mam🙃🥰

  • @khushijain3574
    @khushijain3574 Před 3 lety +4

    maam please keep making videos and guiding us u are my only hope because only your lectures are understandable by me

  • @veerabhadrarao258
    @veerabhadrarao258 Před 2 lety +2

    Tq, u r giving complete crystal clear information.. 🙏

  • @sarikapardeshi794
    @sarikapardeshi794 Před 2 lety +4

    Thank you so much mam...I understood it very clearly...🙏👍👍😇

  • @sirajunissa4276
    @sirajunissa4276 Před rokem +1

    Ur explaining way Is just amazing. it helped me a lot in my studies

  • @fansbilever9676
    @fansbilever9676 Před 3 lety +7

    Thank you mam ..
    You are a god gift to me...
    For cs tq mam

  • @a_yucodes9625
    @a_yucodes9625 Před 3 lety +8

    Really your all lecture are superb nd it helps more nd more to learn any concept in depth 👍👍so we thanks to you for making free content like this ❤️
    But only one think is you miss that iss captions

  • @atilla6013
    @atilla6013 Před 2 lety +141

    #include
    int main()
    {
    int marks;
    printf("Enter the marks out of 100 ");
    scanf("%d",&marks);
    switch(marks/10)
    {
    case 10:
    case 9:
    case 8:
    printf("your grade is A");
    break;
    case 7:
    printf("Your grade is B");
    break;
    case 6:
    printf("Your grade is c");
    break;

    default: printf("your grade is d");
    }
    return 0;
    }

    • @Shreyas_K1044
      @Shreyas_K1044 Před rokem +3

      marks/100 should be their in the place of expression

    • @pegasusboss5672
      @pegasusboss5672 Před rokem +5

      @@Shreyas_K1044 then it will show only default ...

    • @leelasaikrish1966
      @leelasaikrish1966 Před rokem +6

      Bro in case of 80 marks it have to print 'B' grade but according to your program it is printing 'A' grade

    • @Trupti1991
      @Trupti1991 Před rokem

      @@leelasaikrish1966 IT DOESNT MATTER ,,, LOGIC MATTERS ,,,, AND LOGIC IS TRUE...@attila6013

    • @Trupti1991
      @Trupti1991 Před rokem

      👍👍 true and logical
      it works

  • @DailyComedi
    @DailyComedi Před 9 měsíci +1

    I love you, ma'am, your teaching style is wonderful.

  • @shivamrajput2157
    @shivamrajput2157 Před 3 lety +25

    Ma'am please finish this course as fast as possible I have a exam in next month

  • @subhadeepbose4610
    @subhadeepbose4610 Před 3 měsíci +1

    I watch your lectures and I try the programs by myself and I really get happy when I pass. I understand your lectures so well.

  • @GIVEN_U
    @GIVEN_U Před 11 měsíci

    I am learning so much from my beautiful teacher! Great video Ma!

  • @uttej8257
    @uttej8257 Před 3 lety +21

    Mam start c++ as next course 🙏🙏🙏🙏🙏🙏🙏

  • @Nithya.899
    @Nithya.899 Před 9 měsíci +2

    We need to be very thankful to u mam ur lectures helped us a lot by gaining lots of knowledge on c language 🎉

  • @shinyrao2786
    @shinyrao2786 Před 3 lety +3

    U re really an extraordinary teacher ....🥰😍

  • @ashwaniverma5512
    @ashwaniverma5512 Před 3 lety +2

    Thanks a lot for your help 🔥👍

  • @prathameshgarade1919
    @prathameshgarade1919 Před 2 lety +5

    Mam I am fresher and I can understand teaching of only you but not of my college Teachers so thank you so much mam 💓

  • @Ms_zeezah
    @Ms_zeezah Před 8 měsíci +1

    wow, i really love this particular session Thanks for the impact ma, you even explained much better than my lecturer, this will really help me in my forthcoming exam

  • @balkrishnabane1392
    @balkrishnabane1392 Před 2 lety +65

    23:40
    #include
    #include
    int main()
    {
    int marks;
    printf("Enter your marks: ");
    scanf("%d", &marks);
    switch(marks){
    case 80 ... 100:
    printf("Grade A
    ", marks);
    break;
    case 70 ... 79:
    printf("Grade B
    ", marks);
    break;
    case 60 ... 69:
    printf("Grade C
    ", marks);
    break;
    case 35 ... 59:
    printf("Grade D
    ", marks);
    break;
    default:
    printf("You are failed
    ");
    }
    printf("Statement X
    ");
    return 0;
    }

    • @madhavan.1209
      @madhavan.1209 Před rokem +2

      super vroo 👏👏👏

    • @jyotidalavi9298
      @jyotidalavi9298 Před rokem

      👍

    • @bhukyabhanuprasad
      @bhukyabhanuprasad Před rokem +7

      Why did you used the 3 dots in between 70 and 79 ?

    • @devSackey
      @devSackey Před rokem +25

      @@bhukyabhanuprasad The "..." is called the range operator in C and is used to specify a continuous range of values. In this particular case, "case 80 ... 100" indicates that the code block following it will be executed if the expression being evaluated falls within the range from 80 to 100 (inclusive).

    • @cruelgaming8538
      @cruelgaming8538 Před rokem +3

      @@devSackey thanks isaac

  • @aryanshivamiitmentors
    @aryanshivamiitmentors Před 5 měsíci

    YOUR TEACHIN STYLE IS WONDERFULL MA'M

  • @TechDelay
    @TechDelay Před 2 lety +1

    Perfect Explaination

  • @laithwmaboro8597
    @laithwmaboro8597 Před rokem

    Thank you very much ma'am for making this video. It helped me lot in my exam.❤❤

  • @simranverma7601
    @simranverma7601 Před rokem +1

    really such a great teacher god bless you🥰🥰

  • @SHREYASH1220
    @SHREYASH1220 Před 8 měsíci +2

    If you are our cs teacher I come even sunday to class.

  • @HamzaKhan-ei9op
    @HamzaKhan-ei9op Před 10 měsíci +1

    A thankful video 🥰😘

  • @alark_sharma
    @alark_sharma Před 2 lety +1

    All the solutions of Let Us C book exercise are explained here::
    czcams.com/play/PLa86zDUJh7Hd-dpKArE1L9UWBEGKkRTdb.html

  • @continnum_radhe-radhe
    @continnum_radhe-radhe Před 2 lety +2

    Thank you so much mam 🔥🔥🔥

  • @gurupranith9167
    @gurupranith9167 Před 4 měsíci +1

    Thank u so much mam I understood clearly 🙏🙏

  • @Adityakumar-dl4vc
    @Adityakumar-dl4vc Před 11 měsíci

    Now I understand switch case thanks a lot mam

  • @iramshehzadi9215
    @iramshehzadi9215 Před 3 lety

    Thanks a lot ma'm ap ny c start kar di
    Really bundles of thanks.
    Ap ny dda start ki thi to mujhy lga c language skip kar di ap ny ab nhi parhaen gi
    Again Thanks

  • @nusrathussain3139
    @nusrathussain3139 Před 2 lety

    Good explanation of Switch statement

  • @maheshkanneboina3856
    @maheshkanneboina3856 Před rokem +1

    Love you Jenny😍😍😍

  • @parthshroff7357
    @parthshroff7357 Před 9 měsíci +1

    22:09
    code ↓
    #include
    int main(){
    int marks;
    printf("please enter your marks
    ");
    scanf("%d",&marks);
    switch(marks/10){
    case 10:
    case 9:
    case 8: printf("you have got a A grade");
    break;
    case 7:printf("you have got a B grade");
    break;
    case 6:printf("you have got a C grade");
    break;
    default:printf("you have got a D grade");
    }
    return 0;
    }

  • @lakshmipriyanka4490
    @lakshmipriyanka4490 Před 2 lety +2

    Thank you so much❤ mam🤗

  • @bigman4766
    @bigman4766 Před 2 lety +1

    jenny you are very much great

  • @user-zs8rt8qo5n
    @user-zs8rt8qo5n Před 7 měsíci

    Your teaching is so good

  • @vigashiniammu1637
    @vigashiniammu1637 Před 3 lety +20

    After this c programming, kindly post videos on python programming also mam. As I understand clearly if you teach❤️❤️

  • @nishikantalenka1251
    @nishikantalenka1251 Před 2 lety

    You are really superb mam

  • @mdhaidarparwez968
    @mdhaidarparwez968 Před 2 lety

    So nice explanation.

  • @isaac-victorshonowo1838
    @isaac-victorshonowo1838 Před 9 měsíci +1

    Watched and Understood ❤

  • @kishankumarpathak7022
    @kishankumarpathak7022 Před 3 lety +1

    I like your way of teaching maam thank u for spreading knowledge.

  • @user-ch4nx2eh8s
    @user-ch4nx2eh8s Před 11 měsíci +1

    int main()
    {
    int marks;
    coutmarks;
    switch (marks)
    {
    case 81:
    case 82:
    case 83:
    case 84:
    case 85:
    case 86:
    case 87:
    case 88:
    case 89:
    case 90:
    cout

  • @anju7334
    @anju7334 Před 2 lety +1

    Thankyou mam ❤️

  • @14thviking34
    @14thviking34 Před 2 lety

    The teaching in the video is wonderful and mam you are looking beautiful

  • @yokeshwerp6922
    @yokeshwerp6922 Před 3 lety

    Awesome mam

  • @premraj1456
    @premraj1456 Před 3 lety

    Mam ek dam accha se samaj aa gya switch in c

  • @nandhu69
    @nandhu69 Před 3 lety +6

    Love u so much mam 💞 ( only in subject aspect )

  • @codemanishh
    @codemanishh Před 3 lety

    Thanks ❤️mam

  • @JyotiParida-sh7wu
    @JyotiParida-sh7wu Před 5 měsíci

    Thank you

  • @riteshkumar9231
    @riteshkumar9231 Před 2 lety +2

    super video mam

  • @sathardinesh5234
    @sathardinesh5234 Před 2 lety

    thank you mam

  • @arjunm7864
    @arjunm7864 Před rokem

    #include
    Int main()
    {
    Int marks;
    Print("enter the marks");
    Scanf("%d",&marks);
    Switch(marks)
    {
    Case(80to100):
    Printf("a grade");
    Break;
    Case(70to80):
    Printf("b grade");
    break;
    Case(50to70):
    Printf("c grade");
    Break;
    Case(below 40):
    Printf("d grade");
    Break;
    Case:
    Printf("not grade");
    Break;
    }
    return 0;
    }

  • @jeanrioux8750
    @jeanrioux8750 Před rokem +1

    Here is my program. It satisfies all the cases.
    int marks;
    printf("enter marks:");
    scanf("%d",&marks);
    if (marks % 10 == 0) // If marks multiple of 10, then remove 1 from the marks. If you need to print the marks, use another variable to keep track of the real marks.
    marks = marks - 1;
    switch (marks/10)
    {
    case 10:
    case 9:
    case 8:
    printf("grade A");
    break;
    case 7:
    printf("grade B");
    break;
    case 6:
    printf("grade C");
    break;
    default:
    printf("grade D");
    }

  • @SaurabhSingh-jx9xr
    @SaurabhSingh-jx9xr Před rokem

    Thankyou mam

  • @madhumalipremarathna3038
    @madhumalipremarathna3038 Před 3 lety +148

    23:40
    void main()
    {
    int marks ;
    printf("Enter marksbetween 0 to 100 : ") ;
    scanf("%d" , &marks) ;
    switch(marks/10)
    {
    case 10 :
    case 9 :
    case 8 :
    printf("
    Your grade is A") ;
    break ;
    case 7 :
    printf("
    Your grade is B") ;
    break ;
    case 6 :
    printf("
    Your grade is C") ;
    break ;
    default :
    printf("
    Your grade is D") ;
    }
    getch() ;
    }

  • @Parliamentnewspk
    @Parliamentnewspk Před 3 lety +1

    Keep it up

  • @akash2626.-
    @akash2626.- Před rokem

    you are amazing maam

  • @KumaEdecha
    @KumaEdecha Před měsícem

    thank you very much mam you're smart c++ next please

  • @sanjeetshrestha3222
    @sanjeetshrestha3222 Před 2 lety

    Thnx mam

  • @suryanshmishra5262
    @suryanshmishra5262 Před 3 lety +4

    Thnku ma'am literally thnx!!

  • @hiranyasidda1863
    @hiranyasidda1863 Před 2 lety +1

    Mam in the program two it's just about vowel and consonant but if we enter any special character it will print as a consonant so how should we include in the switch statement...please explain mam

  • @navneetrajthakur7606
    @navneetrajthakur7606 Před rokem

    You're an amazing teacher ma'am.your method of teaching helps to understand the topic very well.stay blessed always 🙏😊

  • @munavarahameed3695
    @munavarahameed3695 Před 2 lety +1

    super teacher

  • @praveenthammishetti6342

    #include
    void main()
    {
    int marks;
    printf("Enter your marks");
    scanf("%d",&marks);
    switch(marks)
    {
    case 90:
    case 80:
    case 70:
    printf("A grade");
    break;
    case 60:
    case 50:
    printf("B grade");
    break;
    case 40:
    printf("C grade");
    break;
    default:printf("D grade");
    break;
    printf("All the best");
    }
    }

  • @RashidKhan-wj7cp
    @RashidKhan-wj7cp Před 2 lety +2

    Is including default case is mandatory ?

  • @codingkart245
    @codingkart245 Před 3 lety +4

    i learnt till arrays, im waiting for you to reach till there

  • @hiriharanvm5568
    @hiriharanvm5568 Před 2 měsíci

    #include
    int main()
    {
    int mark;
    printf("Enter values");
    scanf("%d",&mark);
    switch(mark/10)
    {
    case 10:
    case 9:
    case 8:
    printf("A");
    break;
    case 7:
    printf("B");
    break;
    case 6:printf("C");
    break;
    default:printf("D");
    }
    }

  • @shivasmart967
    @shivasmart967 Před rokem

    tq mam

  • @chiara-md9cn
    @chiara-md9cn Před 2 lety +6

    Mam how to print when condition is >=360-firstclass
    >=250-secondclass
    Other wise third class mam
    Pls just give me a hint mam..

  • @user-cz7ie4mx3d
    @user-cz7ie4mx3d Před 10 měsíci

    ❤️❤️

  • @user-mv7dg5qy7c
    @user-mv7dg5qy7c Před rokem +1

    int marks;
    printf("Enter the marks : ");
    scanf("%d", &marks);
    char ch = marks > 80 ? 'A' : marks > 70 ? 'B' : marks > 60 ? 'C' : 'D';
    switch (ch)
    {
    case 'A':
    printf("Grade A");
    break;
    case 'B':
    printf("Grade B");
    break;
    case 'C':
    printf("Grade C");
    break;
    default :
    printf("Grade D");
    }

  • @sharmisthasinhakashyap4949

    Waiting for more videos specially array

  • @RashidKhan-wj7cp
    @RashidKhan-wj7cp Před 2 lety +5

    What if we take case 1 and then again case 1 and putting two different statement in both cases, will both the cases run at input value 1 ?

    • @seelamakash9895
      @seelamakash9895 Před 2 lety

      In first case 1 if you don't write break;
      Then it will check and execute next case i.e. next case 1.
      Until and unless the control finds the break keyword, it will execute all the cases.
      The moment control finds the break keyword, it will come out of the switch block statements and statement x would be executed(which is not part of the switch block statements but the part of the program.)

  • @Ashark866
    @Ashark866 Před 2 lety +1

    Will u please make a video on C++ programming also

  • @srinithyamadhamshetty1251

    Mam can we use for loop for case values

  • @bhukyakrishna6857
    @bhukyakrishna6857 Před rokem

    Your teaching method is very nice mam so many video posted to the python java and c++ programs thank you mam🙏👌👌🥰

  • @Lucky21498
    @Lucky21498 Před 8 měsíci

    😇Why i am smiling unconditionally when you smile 😊

  • @pranavpawar3596
    @pranavpawar3596 Před 3 lety +1

    Mam only single charactor use in this statement?
    String charactor is not allowed?

  • @sabyasputnik_2004
    @sabyasputnik_2004 Před rokem

    3:33 integral type evaluation of switch statement

  • @sMOLLIKRUPA
    @sMOLLIKRUPA Před 3 lety +1

    madam since we can only check equality , how can we do that task using switch?

  • @Dshiva-pn9wu
    @Dshiva-pn9wu Před 2 lety

    I love you ma'am

  • @bhukyaramesh3055
    @bhukyaramesh3055 Před 2 lety +1

    ❤️

  • @t.c.v.vbhaskar3695
    @t.c.v.vbhaskar3695 Před rokem

    thank you so much mam🤩

  • @malleshyadav7366
    @malleshyadav7366 Před 3 lety +1

    Please mam, when u start tuple calculus in DBMS,,,,,, please reply mam,,,🙏🙏🙏🙏

  • @yallamandap
    @yallamandap Před rokem

    madam excelent ur lectures and u r also so beautiful....tq madam.

  • @Mohd_Raavi
    @Mohd_Raavi Před 3 lety

    Ma'am please make video on recurrence relation in DAA

  • @koppuramulu7344
    @koppuramulu7344 Před 2 lety +2

    Mam in switch case why float values are not taking

  • @jarjarbinks9937
    @jarjarbinks9937 Před 2 lety +2

    ma'am why will the other cases be executed if the value that we're getting from the expression isn't the same as that of the case value?

    • @seelamakash9895
      @seelamakash9895 Před 2 lety

      Firstly, the case which matches with the value we have entered will be executed. And if we doesn't specify break after the case, then all other cases would also be executed till it finds break keyword.

  • @artholic9388
    @artholic9388 Před 3 lety +4

    Mam please give notes for entire c programming pdf please mam💚🙏

  • @RanjanSingh-pm6ze
    @RanjanSingh-pm6ze Před 3 lety

    Can we write more than one statement under any case like case1: and within this multiple statements.

  • @suchansenpai8341
    @suchansenpai8341 Před 11 měsíci

    I just increase the workload
    i did it in the most inefficient way😢
    but anyway this is how i did it
    #include
    #include
    void main()
    {
    int marks,ch;
    printf("Enter your marks:");
    scanf("%d",&marks);
    if (marks>=80)
    ch=1;
    else if (marks>=60)
    ch=2;
    else if (marks>=50)
    ch=3;
    else if (marks>=30)
    ch=4;
    switch (ch)
    {
    case 1 : if (marks>=80)
    printf("Grade S");
    break;
    case 2 : if (marks>=60)
    printf("Grade A");
    break;
    case 3 : if (marks>=50)
    printf("Grade B");
    break;
    case 4 : if (marks>=30)
    printf("Grade C");
    break;


    default: printf("Grade D");
    break;
    }
    getch();
    }

  • @qasemfazily953
    @qasemfazily953 Před 2 lety +1

    number of case must in single quotation
    such as
    case '1' .......
    case '2' .......
    in that exampl.