Switch Case Control Statements In C: C Tutorial In Hindi #11

preview_player
Показать описание
In this c programming tutorial video, I have explained you about if else conditionals in c and examples of the same in c. I hope you are enjoying this C course in Hindi.

Best Hindi Videos For Learning Programming:

Follow Me On Social Media
Комментарии
Автор

Hope sab samajh me aa raha hai!
Is this course going slow or Please please reply me??? I am getting mixed feedback. Thanks a lot!

CodeWithHarry
Автор

Code using Switch for Speed of vehicle


#include <stdio.h>

int main()
{
int speed;
printf("Enter your speed\n");
scanf("%d", &speed);

switch (speed)
{

case 40:
printf("Your speed is 40");
break;

case 50:
printf("Your speed is 50");
break;

case 60:
printf("Your speed is 60");
break;

default:
printf("Your speed is not 40, 50 or 60");

}
return 0;

}

ls
Автор

#include<stdio.h>
int main()
{
int day_no;
printf("enter day_no\n");
scanf("%d", &day_no);
switch (day_no)
{
case 1:
printf("monday\n");
break;
case 2:
printf("tuesday\n");
break;
case 3:
printf("wednesday\n");
break;
case 4:
printf("thrusday\n");
break;
case 5:
printf("friday\n");
break;
case 6:
printf("saturday\n");
break;
case 7:
printf("sunday\n");
break;
default :
printf("input must be between 1-7\n");

}
return 0;


}

NitinKumar-gqyr
Автор

{
int score;
printf("Enter your score\n");
scanf("%d", &score);
switch(score)
{

case 12:
printf("your score is 12");
break;

case 16:
printf("your score is 16");
break;

default:
printf("your score is not 12 or 16");


}

return 0;
}

dnyaneshwargaikwad
Автор

Bhai C padhi hai but use refresh krni thi but aap padha rhe ho toh shuru se padhne me jyada maja aa raha hai
Thank you keep it up.

shubhamjaiswal
Автор

#include<stdio.h>
int main()
{
int marks;
printf ("enter your marks\n");
scanf("%d", &marks);
Switch (marks)
{
Case 45:
printf("your marks is 45");
break;
Case 99:
printf ("your marks is 99");
break;
default:
printf ("your marks is not 45 and 99");
break;
}
return 0;
}

vindeshshukla
Автор

Hello brother,
You r doing a great job.
As per your question, The course is going fast but then to getting it understand by repeating the video


My Switch program


#include <stdio.h>

int main()
{
int marks;
printf("enter your marks\n");
scanf("%d", &marks);

switch (marks)
{
case 10:
printf("your marks is 10\n");
break;

case 20:
printf("your marks is 20\n");
break;

default:
printf("your mark is not 10, 20");
}


return 0;
}

chaudharyshoeb
Автор

#include<stdio.h>
int main()
{
int shoes;
printf("Guess the number of pairs of shoes i have");
scanf("%d", &shoes);

switch(shoes)

{
case 2:
printf("You've 2 pairs of shoes);
break;
case 3:

printf("You've 3 pairs of shoes);
break;
case 4:

printf("You've 4 pairs of shoes);
break;

default:
printf("You've give the wrong answer")
}
}

nizamuddinhameed
Автор

// Challenge accepted
/*
author:Nikhil Raj
purpose:To learn Switch Cases
date:18/06/2019
*/


#include <stdio.h>


int main(){
int kitnepanipuris;
scanf("%d", &kitnepanipuris);
switch (kitnepanipuris)
{
case 0:
printf("Bhaiya 10 ke \n");
break;
case 2:
printf("Thode aur khilao \n");
break;
case 4:
printf("Thik hae bhia kitna hua \n");
break;

default:
printf("Ache Pani puri hae");
break;
}
return 0;
}

nikhilraj
Автор

Harry bhai aapke teaching ka tareeka ek dum unique and elementary hai. Aap koi bhi concepts samjhate ho to bohot achche se aur ideal proof ke saath teach karate ho usko easily breakdown karke. Thank you so much.

sineparadox
Автор

#include<stdio.h>
int main()
{
int temp;
printf("Enter the temperature in degree Celsius");
scanf("%d", &temp);

switch(temp)
{
case 40:
printf("Hot\n");
break;
case 10:
printf("Cold\n");

default:
printf("Invalid input");
}

return 0;

}

uditnathprasad
Автор

#include<stdio.h>
int main() {
int a;
printf("Enter a=");
scanf("%d", &a);

switch(a) {
case 1:
printf("value is 10");
break;
case 2:
printf("value is 20");
break;
default:
printf("not found");
break;
}
return 0;
}

NaachMore
Автор

As a beginner I was unable to understand .But your vidoes are seriously soo good, very easy to understand ❤ Also thankyou for your vlogs.

_cst_eshagunjekar
Автор

sir i am from pakistan and matric class student.sir your teaching pattern is so clearly.clearly that way because you teach everthing that could be important to us with the help of your videos you teaching your subscriber everything that they want and free of cost .this is one of the best platfarm where they founds every videos

basitshykh
Автор

#include<studio.h>
int main()
Char ch;
frintf("enter charactor);
Scanf("%c", &ch);
Switch(ch)
{
case 'a' : printf("vowel");
break;
default:printf("uconsoment");
}
return 0;
}

virajdhakane
Автор

#include<stdio.h>
int main()
{
int age;
scanf("%d\n", &age);
printf("enter your age\n", age);

switch(age)
{

case 2:printf("your age is 45");
break;
case 3:printf("your age is below 30");
break;
default:printf("your age is not match");
}
return 0;
}

My code I am beginner

arjunkendre
Автор

#include<stdio.h>
int main()
{
int age, percent;
printf("ENTER YOUR AGE BETWEEN 10 TO 15\n");
scanf("%d", &age);

switch (age)
{
case 10:
printf("you should be in 5th class now\n");

break;

case 11:
printf("you should be in 6th class now");

break;

case 12:
printf("you should be in 7th class now");

break;

case 13:
printf("you should be in 8th class now");

break;

case 14:
printf("you should be in 9th class now");

break;
case 15:
printf("you should be in 10th class now");

break;

default:
printf("i have no information about this age class");

break;
}
return 0;
}

ajaymohankar
Автор

#include<stdio.h> #include<math.h>
int main()
{
Int age;
printf("enter age:");
Scanf("%d", age);

Switch(a) {
case 20: printf("they can drive");
break;
case. 15:printf("they can enjoy ");
break;
Case 22: printf("they can marrige");
break;
Defaulat :
Printf(" they can nothing")
}
Return 0;
}

hetmalani
Автор

#include<studio.h>
int main()
{
Char ch;
printf("enter any ch");
scanf("%c", &ch);
switch (ch);
{
Case'a';
printf("vowel");
break;
case'e';
printf("vowel");
break;
case'i';
printf("vowel");
break;
Case'o';
printf("vowel");
break;
Case'u';
printf("vowel";
break;
dafacult;
printf ("consonant");
return 0;
}

Hariom-ixwr
Автор

Hi Sir, Great Explanation of switch statement. Thank you so much.

SadamHussain-zjei