I am extremely thankful to ALLAH for giving us Sir Saurabh Shukla as The Best Teacher, who teaches programming with excellent, efficient, and comprehensive expertise. Alhumdulillah
Sir , You're the best in the world . I've never seen a person like you on the whole youtube , have this much of intuitive understanding of programming skills . Thank you very much for all your enlightening videos .
Best computer teacher I ever seen...thanks a lot sir for helping us to understand the programming..before this this was mystery to me..now "I can" by learning from ur videos...thanks u sir again from the bottom of my heart..we need more teachers like you. ✌👍
sir I made it with for loop.my logic was :- int x,count; for (count=1; ; count++) { x=x/10; if(x==0) break; } printf("total digits are %d", count); I did dry run n then tried it on my laptop..it was perfectly fine.😍
Sir, i am very happy, thank you for your tutorials, I tried to write a program to function the above-required result and it worked correctly in its 1st attempt itself.... main() { int a,b,c,d; printf("Enter a number : "); scanf("%d",&a); for(b=1;b
hello sir! your videos are very helpful and these will enhance my programming skills for sure!! I want you to do some more programs from topic pointers!!! because pointers is little bit confusing! hope you will consider the same!!! thank you again!
sir! when i am entering a number consisting of more than 5 digits, the output doesn't come desirable. what would be the probable solution for this particular problem??
This is happening because the range of int is -32768 to 32767 . For number having more than 5 digits you have to exceed the range like take long int instead of int.
Try this, It works for counting characters also. void main() { int i; char s[30]; clrscr(); printf("Enter your address"); gets(s); i=strlen(s); printf("Total charaters in your address=%d",i); getch(); }
Sir good morning ,how to calculate a particular number frequecy in any inputted number .for example 23456 is an inputted by programmer if I want in this given number 4 has how many times comes in this inputted number
Thank you for such a clear explanation sir but I had a doubt that what if the user inputs 0000 ( x = 0000)? They are digits as well but according to the condition these digits will not be counted. So, how can I make a program that will count digits in a number including 0s. Thank you !
sir iss me jab tak hum five digit ka ya uss se kam digit ka number input karte hain tab tak to yeh program thik hai jab hum 5 se upper ki number add karvate hain tab answer 1 aa jata hai.esa kyo ??
void main() { int count=0,x; printf("enter a number"); scanf("%d",&x); while(x!=0) { x=x/10; count++; } printf("total digit is %d",count); } sir is program me agar 10 se jyda digit dalta hun to to ouput 10 hshow krta h? aisa kyun sir???
I think it has a minute mistake like when we enter zero it shows zero digit but via concept of significant digit if we have trailing zeroes then we will not count but if we have a number which has only zero then here we will count only one zero i.e. conclusively zero is a digit, so it should show 1. the question will be correct if we include "NATURAL" befor enumber.
Sir by the grace of Almighty, i have cleared by lab exam of C. Your videos proved to be blessings for me. your videos helped me immensely in clearing my lab exam.
how can we separate an integer from a string and store it into another variable??? ex: input: Ab4 separate 4 into another variable i.e. x=4 and print a i.e. output=4
Hello sir i am facing one problem & problem is that this is working correctly for 5 digit number. but if i enter 6 digit number so it is giving me output as 4 digits number.
Sir when I enter more than 5 number in x so it's show tha only 5 or 4 digit . Ex- x= 123456 Output = 4 If I entered 1234567 so, It show Output is only 5.
bro the variable in which you store the number as you may set it to LONG LONG INT instead of only INT than it work for numbers bigger than 10 digits too ..hope it works
sir if i enter 0 this it gives 0 digits then i use do while loop its print correct but then i enter 000 this also gives 1 digit? why and how to fix it plz reply.....
@@mysirgdotcom sir 5 digits se bada number enter karne par garbage value aa rha hai .aap isaka answer kyu nhi de rhe hai sir bahut logo ne question kiya hai but aap reply nhi kar rhe
The number is still 0. The number 000 is same as 0. If you want to yield result of input 000 as 3, you can treat input not as a number but string and deduce the length of the string
Try this code, It's works for counting characters also. void main() { int i; char s[30]; clrscr(); printf("Enter your address"); gets(s); i=strlen(s); printf("Total charaters in your address=%d",i); getch(); }
Sir... Aapke her video really mujhe c programming me coding aur logic me improvements karaa rahi h........
I am extremely thankful to ALLAH for giving us Sir Saurabh Shukla as The Best Teacher, who teaches programming with excellent, efficient, and comprehensive expertise. Alhumdulillah
Aʟʟᴀʜ ʙᴏᴊʀɪᴋᴇ 😅😅😂😂😂
Sir , You're the best in the world . I've never seen a person like you on the whole youtube , have this much of intuitive understanding of programming skills . Thank you very much for all your enlightening videos .
I have learnt to build program logic just because of Sir Saurabh's best lectures.
Best computer teacher I ever seen...thanks a lot sir for helping us to understand the programming..before this this was mystery to me..now "I can" by learning from ur videos...thanks u sir again from the bottom of my heart..we need more teachers like you. ✌👍
awesome videos sir , you are great sir
Mubarakk sir 600k soon😍😍
sir u r grate
kitna aacha samajate hai aap
teaching skills too good sir thank you
sir I made it with for loop.my logic was :-
int x,count;
for (count=1; ; count++)
{
x=x/10;
if(x==0)
break;
}
printf("total digits are %d", count);
I did dry run n then tried it on my laptop..it was perfectly fine.😍
Osm😍
Osm
Ok
really sir..very helpful video..
Thank you sir, you helps us lot,
Mujhe ek din aapko jarur milna hai.
Sir, i am very happy, thank you for your tutorials, I tried to write a program to function the above-required result and it worked correctly in its 1st attempt itself....
main()
{
int a,b,c,d;
printf("Enter a number : ");
scanf("%d",&a);
for(b=1;b
Thanks 🙏 sir
You are a great teacher.
Thanks.
the way of teaching is good
thankyou sir!!it was a wonderfull explanation
Only four word you are the best
Sir, ye program sirf 10 numbers tk hi count kr rha hai agr usse jayda values user ne input kr diye to phr to program glt result dega.
Same bhai yahi mera saath ho raha hai
Thanku so much sir
U are excellent
hello sir! your videos are very helpful and these will enhance my programming skills for sure!! I want you to do some more programs from topic pointers!!! because pointers is little bit confusing! hope you will consider the same!!! thank you again!
From Nepal thank you for every thing
Kata ho bro nepal
sir! when i am entering a number consisting of more than 5 digits, the output doesn't come desirable.
what would be the probable solution for this particular problem??
This is happening because the range of int is -32768 to 32767 . For number having more than 5 digits you have to exceed the range like take long int instead of int.
How can we extend....pls mam explain as
@@sultanasaifi9498 long int lene ke bad bhi nhi aa rha
Try this,
It works for counting characters also.
void main()
{
int i;
char s[30];
clrscr();
printf("Enter your address");
gets(s);
i=strlen(s);
printf("Total charaters in your address=%d",i);
getch();
}
@@ajitdubey6503 double long try kro
Sir good morning ,how to calculate a particular number frequecy in any inputted number .for example 23456 is an inputted by programmer if I want in this given number 4 has how many times comes in this inputted number
You are great sir
Thanks you so much sir 🥺😘
Thank you for such a clear explanation sir but I had a doubt that what if the user inputs 0000 ( x = 0000)? They are digits as well but according to the condition these digits will not be counted. So, how can I make a program that will count digits in a number including 0s.
Thank you !
Sir agar koi large number enter krte hai to answer wrong kyu aa rha hai.
....Count ki value 5 se jada nhi ho sakti kya?
Respected sir,
We cannot count 0 as a digit?
Plz .. explain me
execellent explanation
fghfghhhjghjgjbn
nice explanation
nice explanation sir
kya aapka logic ten digit se upr bhi kaam krta he?????
plzzz reply
Sir g jab 10 se zyada numbrs inter karly to phir bhi total digit 10 out put dekata hain kya masla hain sir.
Thanks sir
Sir ,
how can i make this program in for loop.
nice
sir iss me jab tak hum five digit ka ya uss se kam digit ka number input karte hain tab tak to yeh program thik hai jab hum 5 se upper ki number add karvate hain tab answer 1 aa jata hai.esa kyo ??
Sir 🙏🙏🙏
If I entered more than 5 digit results not correct.
sir when we enter more than 5 number it count =0
what's is the problom
this is problem sir
sir gives more recursive approach videos
why we can not write in while loop as i=x/10; sir Answer please🙏
Nice : )
What is the code if we write above program by using only for loop...no if else
void main()
{
int count=0,x;
printf("enter a number");
scanf("%d",&x);
while(x!=0)
{
x=x/10;
count++;
}
printf("total digit is %d",count);
} sir is program me agar 10 se jyda digit dalta hun to to ouput 10 hshow krta h?
aisa kyun sir???
Sir total digits greater then 10 are not acceptable in this program.....Why?????
not only greater than 10 but also greater than 5 ...
I think it has a minute mistake like when we enter zero it shows zero digit but via concept of significant digit if we have trailing zeroes then we will not count but if we have a number which has only zero then here we will count only one zero i.e. conclusively zero is a digit, so it should show 1. the question will be correct if we include "NATURAL" befor enumber.
Can we solve this problem for loop also? Plz reply
i wish my C instructor explains in the same way as you do..
indeed, you are Sir!
Sir by the grace of Almighty, i have cleared by lab exam of C. Your videos proved to be blessings for me. your videos helped me immensely in clearing my lab exam.
now upcoming is my theoretical paper of C. so kindly guide me regarding that.
thank you sir
How to make tally counter
Sir main programing strong kaise kru pls help me sir...
Thnking you
Awesome
Thanqu sir
how can we separate an integer from a string and store it into another variable???
ex: input: Ab4
separate 4 into another variable i.e. x=4
and print a
i.e. output=4
Sir if se ho sakta hai count digits
Thanks
Thanks a lot
Sir, What if i will type 0 as it is a single digit. but it will give ans as 0
thank you so much
Sir how to count the number of active objects in a cop program having static data members and member functions
Hello sir i am facing one problem & problem is that this is working correctly for 5 digit number. but if i enter 6 digit number so it is giving me output as 4 digits number.
Sir ek programme karke digiye. Wap to input 5th digit no and print its second and 5th digit
Sir plz make video to find generic root of number using while loop..
How to calculate if any digit repeat
Sir when I enter more than 5 number in x so it's show tha only 5 or 4 digit .
Ex- x= 123456
Output = 4
If I entered 1234567 so,
It show Output is only 5.
when i entered 6 or more digits why it is giving only 4 as output?
Sir, why you have written void in this program?
Bcz it returns nothing
Sir , why modulus doesnt work ??
Thankyou very much :-)
Sir up to 10 digits it working properly but after 10 digits its get wrong answer.Sir please reply.
bro the variable in which you store the number as you may set it to LONG LONG INT instead of only INT than it work for numbers bigger than 10 digits too ..hope it works
@@muhammadumerbaig3607 nhi ho rha hai bhai
Sir!! What? If we put "0" As a digit... The answer will be wrong. So we should use do-while loop in case of while loop. That'll be more correct
Sirr glt output aa rha agr 5 ye bda digit de rhe to.. Plse help kre
haaa
sir when we input 0 in this program , what will happen ?
tell me as fast as
but sir 0 is also digit or not ?
How to find digit in a number is range of digit is( 0
Sir but it cant count digits when we insert 0 in between plzz help
sir can u upload a vedio of program to find the position of number which we want to search!!
sir whn u upload computer organization architecture?? plz rply sir ??
Thnx fr informing !!
ATIQUL AHMED how he replied?
Sir plz upload program on how to count frequency of digits in an integer number given by user
Write a program to print immediate next prime number of a given number.
could you please tell me the logic for this program?
Sir I have another logic for this program...
sir if i enter 0 this it gives 0 digits then i use do while loop its print correct but then i enter 000 this also gives 1 digit? why and how to fix it plz reply.....
bro use do while loop.
sir this program does not work for more tha n 5 digits
Sir count minus main kyun display ho raha hai
Sir ji is logic se sare sahi aa rhe hain but agar Mai input me 0 likh rha hu to answer 0 aa rha hai Lekin Anna to 1 chahiye. Pls tell sir.
use do while loop
😂😂😂 bro check conditions. ...
I need a program of.
Calculate digits of a number.
And print printf .
Matlab jitne numbers hoge utne print f print hona
How to find middle digit of a long integer number in c
sir isme printf ("%d",count);ko loop k bahar kyu kiya hai
because isko repeat nahi karna hai
@@mysirgdotcom sir 5 digits se bada number enter karne par garbage value aa rha hai .aap isaka answer kyu nhi de rhe hai sir bahut logo ne question kiya hai but aap reply nhi kar rhe
Put input 00 ..It will show o/t as 0 instead of 2 ..
What if there is a decimal no.?
sir more than 6 digits if we entered the answer will be wrong... plz solve this
It's not working for 12 digits
what if we enter 0 as the number. The output should be 1 but here the output will be 0.
use do while loop
what if we enter a number 000 the output should be 3 but output is 0?
The number is still 0. The number 000 is same as 0.
If you want to yield result of input 000 as 3, you can treat input not as a number but string and deduce the length of the string
sir 5 ya jada digit wale number ka output galat aaraha hai
how to count digits using for loop
it doesn't work if x=0 as if x=0 then the body of while loop will not execute and printf will print 0 but 0 has one digit
they are not counting '0", what if i also what to count '0' as a digit
Exactly..
Try this code,
It's works for counting characters also.
void main()
{
int i;
char s[30];
clrscr();
printf("Enter your address");
gets(s);
i=strlen(s);
printf("Total charaters in your address=%d",i);
getch();
}
Sir yeah for se kaise hoga