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.😍
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, 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 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
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.
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! 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(); }
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 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.
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 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 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.
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.....
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
sir u r grate
kitna aacha samajate hai aap
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
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, 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
teaching skills too good sir thank you
Mubarakk sir 600k soon😍😍
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!
Thank you sir, you helps us lot,
Mujhe ek din aapko jarur milna hai.
really sir..very helpful video..
From Nepal thank you for every thing
Kata ho bro nepal
Only four word you are the best
Thanku so much sir
U are excellent
You are a great teacher.
Thanks.
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
the way of teaching is good
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.
thankyou sir!!it was a wonderfull explanation
Thanks you so much sir 🥺😘
kya aapka logic ten digit se upr bhi kaam krta he?????
plzzz reply
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
Thanks 🙏 sir
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
You are great sir
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
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 plz make video to find generic root of number using while loop..
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
nice explanation
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
why we can not write in while loop as i=x/10; sir Answer please🙏
What is the code if we write above program by using only for loop...no if else
Can we solve this problem for loop also? Plz reply
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.
execellent explanation
fghfghhhjghjgjbn
Thank you sir
Sir plz upload program on how to count frequency of digits in an integer number given by user
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
nice explanation sir
sir gives more recursive approach videos
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 ??
Nice : )
Thanks sir
nice
Sir 🙏🙏🙏
If I entered more than 5 digit results not correct.
Put input 00 ..It will show o/t as 0 instead of 2 ..
Sir g jab 10 se zyada numbrs inter karly to phir bhi total digit 10 out put dekata hain kya masla hain sir.
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.
sir when we enter more than 5 number it count =0
what's is the problom
this is problem sir
Sir total digits greater then 10 are not acceptable in this program.....Why?????
not only greater than 10 but also greater than 5 ...
Sir ,
how can i make this program in for loop.
thank you so much
Sir if se ho sakta hai count digits
Thanks a lot
How to find digit in a number is range of digit is( 0
How to make tally counter
Sir, What if i will type 0 as it is a single digit. but it will give ans as 0
Thanks
Thanqu sir
when i entered 6 or more digits why it is giving only 4 as output?
Write a program to print immediate next prime number of a given number.
could you please tell me the logic for this program?
sir more than 6 digits if we entered the answer will be wrong... plz solve this
I need a program of.
Calculate digits of a number.
And print printf .
Matlab jitne numbers hoge utne print f print hona
Thankyou very much :-)
Sir I have another logic for this program...
Sir main programing strong kaise kru pls help me sir...
Sir how to count the number of active objects in a cop program having static data members and member functions
sir can u upload a vedio of program to find the position of number which we want to search!!
Thnking you
Awesome
How to calculate if any digit repeat
but sir 0 is also digit or not ?
your this code will not work when the input number will be '0'. It will give output 0. But the answer should be 1. Since 0 is also a digit.
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
Sir but it cant count digits when we insert 0 in between plzz help
How to find middle digit of a long integer number in c
What if there is a decimal no.?
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. ...
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 , why modulus doesnt work ??
sir when we input 0 in this program , what will happen ?
tell me as fast as
THIS PROGRAME CAN'T COUNT A NUMBER MORE THAN 5 DIGITS! WHY? IS THERE 'INT KEY WORD MEMORY PROBLEM?
Sir, why you have written void in this program?
Bcz it returns nothing
To count the number of notea in the given amount ye program provide kar den sir
This program goes only till 10 it cant check more then 10 digits. Helppp
Sir count minus main kyun display ho raha hai
sir this program does not work for more tha n 5 digits
sir whn u upload computer organization architecture?? plz rply sir ??
Thnx fr informing !!
ATIQUL AHMED how he replied?
what if we enter 0 as the number. The output should be 1 but here the output will be 0.
use do while loop
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 5 ya jada digit wale number ka output galat aaraha hai
Sirr glt output aa rha agr 5 ye bda digit de rhe to.. Plse help kre
haaa
how to count digits using for loop
Sir yeah for se kaise hoga