Palindrome program in C | Check if number or string is Palindrome | #9 Coding Bytes
ฝัง
- เผยแพร่เมื่อ 27 ก.ย. 2024
- In today's video, we will discuss how to check if a given number or a string is a palindrome or not. If you want to know the detailed solution of the discussed programs in C, C++, Java or Python, then refer the below links.
Program to check if a given number is a palindrome - bit.ly/2NCBHZ0
Program to check if a given string is a palindrome - bit.ly/2p8LjkX
For aptitude and programming preparation resources, recruitment drive updates, interview tips & tricks, come join the largest learners' community on Telegram and WhatsApp and take your placement preparation to the next level.
Join here:
Telegram: t.me/faceprepo...
WhatsApp: bit.ly/2MgoYMR
Ma'am ,if we consider a string like "moram". So then,we should not give break in this position.Because if(m!=m), condition false ,and then break statement help to terminate the loop ,and print both are same string.
Short and sweet logic explanation
Your classes are very useful... 😇
Can we use string reverse function to check whether it is palindrome or not
Can you please write that code ..what you have assumed??....
Thanks for the explanation ☺️it's very useful
Your teaching technique is very good and voice as well
Thank you FACE PREP♥️♥️
Thank you for such a great explanation 💫🤩🥰
Thanks for explaining the logic
I think this video will help at least little bit to those who will watch
Logic is very good thanks
Thanks for the great explanation
Tq so much this video 📷📷📷 helped me a lot to understand the concept
What happen if the character is palindrome then also it will break out from for loop in 1st iteration only
If the first condition is true than it will loop through all until condition is false. But if the first or any next iteration is false it will break from loop before completion and give output as non palindrome.
Could u please give me the program to check wether the words in a given sentence are palindrome.if not reverse the word.print the new sentence right now ples? Fast.
Had a great session
Mam how to use pointers in palindrome
Awesome class.
Thanks mam
THANK YOU SO MUCH, MAM... I HAVE A DOUBT IN THAT CONCEPT AND NOW YOU CLEARED THAT MAM
Awesome video
ALP to Check string is palindrome or not in ARM 7 Program one program send madi
Thank you so much❤️👍
Good work mam
your string palindrome logic is not complete.
for(i=0;i
Please provide full of the program 🙏
actually there is no point in checking entire length of the string, half of it will do, it is c# but you all will get it :)
static bool IsPalindrome(string text){
int len = text.Length;
int halfLen = len /2;
len -= 1;
for(int i = 0; i < halfLen; i++){
if(text[i] != text[len - i]) return false;
}
return true;
}
Explaning skill 👌
After breaking the while loop ,The value of n would be zero
Awesome ya!!!
Nice explanation
Want to see more
But I want in python not in C😢😢. Anyway you r looking gorgeous😍😍
If u know Concept, write any programming language it's simple.
@@suriyaprakash5172 If I know Why would I prefer to your videos bro
U had not initialize the rem in program
It's just a pseudo code buddy. But yeah you are right it has to be initialized.
Easiest way to understand palindrome program
int main(void)
{
int a,b,c,d,e,f;
printf("Please Enter a 5 digit number: ");
scanf("%d",&a);
b=a/10000;
c=a/1000;
d=c%10;
e=a%10;
f=a%100/10;
if(b==e && d==f)
{
printf("Your number is \"palindrome\" = %d
",a);
}
else
{
printf("Your number is \"NOT\" palindrome-%d
",a);
}
printf("Thank you!");
return 0;
}
❤❤❤
We love you too.
You need to practice a lot how to explain things
You need to Practice a lot how to understand things.
Plz send me mam
Thank u so much madam
mam so cute ❤
In this program what is the use of flag madem why you write flag Flag means madem explain mam
what is the for loop for given number is palidrome or not
input:noon5
output:noon is palindrome. pls slove this.
why we use flag can anyone explain
Your Explanation is really awesome...
Thank you So much
🔥🔥
I think you are wrong, break should be inside if loop
Ya I also think so
You are right!
your logic is very simple .
Thank you mam
are you single...?