Тёмный

Special Programs in C − Check If The Number Is Palindrome Number 

Neso Academy
Подписаться 2,7 млн
Просмотров 293 тыс.
50% 1

Опубликовано:

 

27 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 105   
@youtubeweb3009
@youtubeweb3009 4 года назад
I don't think I'll be able to think any logic like this Like this guy does I wish i was smarter... :(
@amiralam1786
@amiralam1786 4 года назад
i wish sooo :-( i am so upset!
@technicaljethya993
@technicaljethya993 3 года назад
He looks smarter to us because he had done lot of practice and hardwork ,do the same then other people will think same about you😉
@AshishKhetwal
@AshishKhetwal Месяц назад
did you get smarter bro?
@guptagopal
@guptagopal 6 лет назад
thanks a lot & congratulations because now you have 0.33M subscribers and I prey that your this journey will travel an infinite long distance.
@mdzaid3880
@mdzaid3880 2 года назад
now its 1.38M and counting..
@vedant8002
@vedant8002 2 года назад
1 .5
@tomidebbie2078
@tomidebbie2078 Год назад
Now at 1.9🎉
@jyotideveda350
@jyotideveda350 3 года назад
It is explained clearly but I couldn't understand the use of last logic that is q=q/10...
@nehasawant9460
@nehasawant9460 2 года назад
Me too
@ShahbazKhan-pf3oo
@ShahbazKhan-pf3oo 2 года назад
It's actually used to truncate the number.. For ex. n=156, we take it as q, rem=q%10 i.e 6 in this case, result=0×10+6=6, then q=156/10=15..thus we have stored the last digit in result and now we are left with 15, therefore now the loop will run again since q!=0, now rem=15%10=5, result = 6×10+5 =65, thus we reversed the last two digits now we have to truncate them so again q=15/10=1, again the loop will run, now rem=1%10=1, result=65×10+1=651, hence now we have completely reversed it, again q=1/10=0 thus it finally comes out of the loop now since it's fully reversed and q is now = 0...since in this example the original and the reversed number is not the same therefore it's not a palindrome
@nehasawant9460
@nehasawant9460 2 года назад
@@ShahbazKhan-pf3oo thanks
@abhishek1978
@abhishek1978 Год назад
​@@ShahbazKhan-pf3oothank you so much bro❤️❤️❤️❤️
@VarshaReddy-bf4ku
@VarshaReddy-bf4ku 11 месяцев назад
U just divide the given number by 10
@SANTHOSHKUMAR-px7yt
@SANTHOSHKUMAR-px7yt 3 года назад
A good coaching in this video might be u can give brief explanation..thanks to neso academy
@abuhozaifa8719
@abuhozaifa8719 6 лет назад
Ser please upload videos about arrays in c.. Neso academy..
@mayankjadhav4509
@mayankjadhav4509 6 лет назад
sir, please upload more videos like this for Armstrong number, strong number etc...and please upload is as soon as possible.
@yacine8171
@yacine8171 Месяц назад
We can also find the number of digits first using while loop , then finding digits of the number starting from the last one and multplying each one to the power of ( number of digits - i) with the use of for loop , after that we add all of them getting a final result then comparing it to the number we have if result = number __> palindrome if not then not a palindrome
@currentxchange
@currentxchange 3 года назад
Not sure about in c but you could also do this by converting to string and comparing characters
@mauryaashish1865
@mauryaashish1865 3 года назад
This was little hard for me to understand, how the code was actually working! But finally able to understand 😊
@mauryaashish1865
@mauryaashish1865 3 года назад
@@kellenlance7184 Now you guys broke up! LOL 😂
@mauryaashish1865
@mauryaashish1865 3 года назад
@Aydin Gregory Thumbs up to you! 😀
@thomasbulus
@thomasbulus Год назад
Thank you for the wonderful teaching sir. But why do we have to declare the variable n and later assigned its value to q in the code?
@varadharlikar
@varadharlikar 5 месяцев назад
Not neccassary but it makes it easy to access an value
@darkwhisper98
@darkwhisper98 6 лет назад
thanks for the help!! new subscriber and programmer
@yassinbagane
@yassinbagane 3 года назад
we simply can use 2 loops the first one i starts for 0 and the other one starts from the end and compare if t[i]!=t[j] break if not print the number/word is palindrome
@uraharakisuke5305
@uraharakisuke5305 2 года назад
for that you'll need to convert the number to string
@ahsayadshabana3621
@ahsayadshabana3621 2 года назад
Hi
@hhcdghjjgsdrt235
@hhcdghjjgsdrt235 2 года назад
@@uraharakisuke5305 leetcode has that kind of problem.
@yogavelanbj9967
@yogavelanbj9967 6 лет назад
Sir please upload videos for control system engineering
@shrur3527
@shrur3527 11 месяцев назад
Tq🙏🙏❤️❤️
@awilomar8383
@awilomar8383 2 года назад
thank you neso acedemy
@truegrabbers
@truegrabbers 4 года назад
Jaspreet Singh Sir d best
@mehediazad1780
@mehediazad1780 2 года назад
thank you
@ujjwal2473
@ujjwal2473 3 года назад
Thank you so much neso academy, you are always the best.
@beingkind3610
@beingkind3610 2 года назад
Thank you so much...
@rsingh6216
@rsingh6216 3 года назад
If you are finding it difficult then. 1. Copy pen nikaalo aur loop ko poore process mei line by line calculate kro koi bhi palindrome leke. 2. q=n kyu kiya hai ye smjho. 3.result ko 0 kyu liya tha ,wo jab tum copy pen loge pta chl jaega.
@ececse
@ececse Год назад
thankyou sir
@APstudent-y6s
@APstudent-y6s 8 месяцев назад
7:58 thnx... bt fr the 1st time u kinda failed to crystal clear the logic to us. yet learned.
@aatmakumar4631
@aatmakumar4631 2 года назад
Nice class sir
@TanjilAl-Nayeef
@TanjilAl-Nayeef 8 месяцев назад
Thanks . Love from Bangladesh 🇧🇩 and love from #Chandpur_Science_and_Technology_University-(#CSTU)
@andistheinforitbutso7513
@andistheinforitbutso7513 2 года назад
Good Afternoon
@Dnsx_plus
@Dnsx_plus 4 года назад
Why can't we just convert the number into a string, find the lenght of the string, subtract it by one so it accesses the last character in the string, and put it in a forloop and keep adding one to the lenght of the string variable and checking it?
@yenzyhebron5278
@yenzyhebron5278 3 года назад
That's possible, works best for word palindromes
@Dnsx_plus
@Dnsx_plus 3 года назад
@@yenzyhebron5278 awesome, thanks
@gugunkhongsai13
@gugunkhongsai13 3 года назад
I think your code still shows "its not a palindrome" even for palindromes
@I_am_smooth_as_butter
@I_am_smooth_as_butter 5 лет назад
I can only check upto 10 numbers can u answer why..I used unsigned long long but nothing has changed..
@20_SinManya
@20_SinManya 5 лет назад
I have one doubt: Is '1001' is a palindrome (Note the single quotes before answering)?It would be very nice if you can show the program using strings.
@vprakash2471
@vprakash2471 3 года назад
For that we need to use arrays.... using arrays it will be very easy, just one for loop will be used.
@KurokishiYT
@KurokishiYT 2 года назад
@@vprakash2471 what if we we convert the number into a string a get the first and last character and compare them? i mean palindrome numbers always start and end with the same numbers
@julyxi
@julyxi 3 года назад
cool video!!!
@harishbabuthrovagunta2245
@harishbabuthrovagunta2245 2 года назад
what is code about racecar,xox ..etc; wether to checkpalidrome or not ?
@amiteshyadav231
@amiteshyadav231 5 лет назад
How to check the given string is palendrom or not sir plzzz
@ضحكتكتهمنا-ط3ر
@ضحكتكتهمنا-ط3ر 3 года назад
pls help me what i do when i try to think in problem and failed again and again for week and with pin and paper and failed again and ask hint and not know this problem and after all this i see answer her is this true ??!! thanks for this video and need any one make experience said me is this good way or know.
@camerald8257
@camerald8257 3 года назад
This is lit♥️
@tayyab.sheikh
@tayyab.sheikh 10 месяцев назад
I couldn't understand this line q = n
@IvyAmistad-v1n
@IvyAmistad-v1n 3 месяца назад
would this also work with floats?
@Trafalgar_D_law_
@Trafalgar_D_law_ 4 года назад
what is the remainder of 2%10 ?last step , so the given example should not be palindrome know
@java_shaileshkushwaha878
@java_shaileshkushwaha878 4 года назад
2%10 division goes 0 time 0 is quotient and remainder is 2
@gagansingh7251
@gagansingh7251 2 года назад
How will we check for names
@thejagoud2950
@thejagoud2950 5 лет назад
sir please upload datastructers vedios please
@professorcat431
@professorcat431 6 лет назад
Badhiya video
@vikaythchandra9236
@vikaythchandra9236 2 года назад
But how will it know that after dividing 2332 with 10 it should divide 233 with 10 and after that it should divide 23 with10 and 2 with 10???
@vikaythchandra9236
@vikaythchandra9236 2 года назад
i had to proces what doubts i had
@JayKumar-mr2oh
@JayKumar-mr2oh Год назад
q=q/10;
@satishkumarperla1989
@satishkumarperla1989 6 лет назад
will u complete syllabus before gate'19 sir?
@Indianitguy-cv6pf
@Indianitguy-cv6pf 4 года назад
Sir we cannot check the number of digit greater than 11 please explain it
@formaltechz
@formaltechz 9 месяцев назад
Racecar is palindrome 😅
@mohamedkhawaga8067
@mohamedkhawaga8067 2 года назад
firstly , thank you for effort i have tried 123454321 and it is palindrome while 12345654321 is not ??!!
@NeighbourHeap
@NeighbourHeap 2 года назад
Even ..i am facing same issues, for very big numbers it's showing like this... I even tried to by making int to long long int ...now wt to do??
@thanuja.07
@thanuja.07 2 года назад
Why should we assign n to q q=n;
@techieuniquegiddy
@techieuniquegiddy Год назад
because we want to use q for our manipulation and not touch n, so that at the end we can compare n with the result
@DNNGadget
@DNNGadget 3 года назад
Me still learning this code, C is base lol 😁
@rishabhmodi9732
@rishabhmodi9732 3 года назад
What happen if we put q=n; inside while loop
@JayKumar-mr2oh
@JayKumar-mr2oh Год назад
Ah, the q=q/10 statement would be useless.
@abhishekhugar212
@abhishekhugar212 3 года назад
In my laptop execution time is too long, So please someone suggest me a good application for c language in laptop 🙂
@Elliababy2
@Elliababy2 5 месяцев назад
vs code
@krinesh
@krinesh 2 года назад
4:53
@ItsAbhiDestiny
@ItsAbhiDestiny 2 года назад
🤟
@currycel470
@currycel470 9 месяцев назад
Lol, spent 30 mins to figure out what i am doing wrong, just realised i declared n = q not q=n. lmao
@anubhav3623
@anubhav3623 3 года назад
why is q!=0 in while loop
@vishal-sr5et
@vishal-sr5et 3 года назад
Bcoz at the end ,when last digit from back ,is divided by 10,it would give 0 and our reversing processing would be finished
@anubhav3623
@anubhav3623 3 года назад
@@vishal-sr5et thanks bro
@palani8776
@palani8776 6 лет назад
Sir what compiler you are using
@mayankjadhav4509
@mayankjadhav4509 6 лет назад
CodeBlocks
@hemalakshmi9044
@hemalakshmi9044 3 года назад
Codeblocks
@valishapallav1990
@valishapallav1990 3 года назад
why should we use only 10 to divide the number, i have doubt in it
@jaydenferrer7096
@jaydenferrer7096 3 года назад
becuz u want to remove the last digit each time
@allaboutlovelife3915
@allaboutlovelife3915 2 года назад
Face reveal plz
@anubhav3623
@anubhav3623 3 года назад
plz reply
@priyankabehera8288
@priyankabehera8288 3 года назад
🙏🙏🙏🙏
@tasneemmohammad2452
@tasneemmohammad2452 Год назад
#include int main() { int result=0,n,rem,x; scanf("%d",n); x = n ; while(x!=0) { rem = x%10; result = result*10 + rem; x = x/10; } if (result == n) printf("palindrome"); else printf("not palindrome"); return 0; } goddamit im not getting required result.whyy?
@JayKumar-mr2oh
@JayKumar-mr2oh Год назад
Put & ampersand symbol in scanf while storing value at n variable.
@true4189
@true4189 4 года назад
Thank u
Далее
Special Programs in C − Pyramid of Stars
11:06
Просмотров 881 тыс.
Always Help the Needy
00:28
Просмотров 7 млн
Recursion in C
11:12
Просмотров 932 тыс.
Special Programs in C − Binary to Decimal Conversion
7:40
Writing Code That Runs FAST on a GPU
15:32
Просмотров 564 тыс.
Special Programs in C − Fibonacci Series
7:10
Просмотров 228 тыс.