tag:blogger.com,1999:blog-959939550345671470.post6341369129627625718..comments2024-03-24T12:51:18.535+05:30Comments on C programming Interview questions and answers: Check the given number is palindrome number or not using c programPriyanka kumarihttp://www.blogger.com/profile/08145649011863585828noreply@blogger.comBlogger15125tag:blogger.com,1999:blog-959939550345671470.post-75162449252836091322017-06-30T20:30:11.252+05:302017-06-30T20:30:11.252+05:30It can be solved with less
Variable
Like:
main()
...It can be solved with less <br />Variable<br />Like:<br />main()<br />{<br /> int num,ori;<br /> clrscr();<br /> printf(" \n Enter any four digit integer no.:");<br /> scanf("%d", & num);<br /> ori= num;<br /> num=num%10*1000+num/10%10*100+num/10%10*10+num/1000;<br /> if(ori==num)<br /> {<br /> printf("\n no. Is palindrome");<br /> }<br />Anonymoushttps://www.blogger.com/profile/00428171149842038577noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-79924726859957895822015-10-15T16:24:07.503+05:302015-10-15T16:24:07.503+05:30Can you please tell us in more detail what each va...Can you please tell us in more detail what each variable is ? Anonymoushttps://www.blogger.com/profile/10680142740061684168noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-91763833483760010162014-09-19T18:32:30.695+05:302014-09-19T18:32:30.695+05:30This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/17780889587802030345noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-42043485137874849692014-05-29T02:59:18.912+05:302014-05-29T02:59:18.912+05:30This is Interview question? solve thisProgram
pal...This is Interview question? solve thisProgram<br /><br />palindrome can't use loop function???<br /> sabarishpkhttps://www.blogger.com/profile/15425795388357452839noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-74210019066596536242013-12-07T22:17:32.016+05:302013-12-07T22:17:32.016+05:30write a code to determine either the number entere...write a code to determine either the number entered is a palindrome(454,6776)or not?<br />Anonymoushttps://www.blogger.com/profile/04262656479749081537noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-2487526857776424902013-10-26T19:56:16.713+05:302013-10-26T19:56:16.713+05:30no it must not be i have explained it in above que...no it must not be i have explained it in above questionAnonymoushttps://www.blogger.com/profile/16405084660596744344noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-51241371645792422342013-10-26T19:54:36.369+05:302013-10-26T19:54:36.369+05:30it means that while temp is grater than zero it wi...it means that while temp is grater than zero it will run <br />r=num%10 is done in order to take out the last digit because % gives remainder line if if int num=1234 and int r=1234%10<br />then r=4 since the initial value of sum is zero therefore for the first time sum will be r that is 4 for the second time it will be 4*10+3 and so on at last it will be 432*10+1 that is 4321<br />if you have Anonymoushttps://www.blogger.com/profile/16405084660596744344noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-18175803077826972522013-07-14T11:11:54.059+05:302013-07-14T11:11:54.059+05:30plz say program of to print palindromes from 1 to ...plz say program of to print palindromes from 1 to 50 Anonymoushttps://www.blogger.com/profile/12348494049991755127noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-73585496245656117712013-04-29T17:16:50.406+05:302013-04-29T17:16:50.406+05:30thanks!!
Visit 2pforinterview.blogspot.in if anybo...thanks!!<br />Visit 2pforinterview.blogspot.in if anybody want to prepare programming and puzzles for Technical interviews.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-69091259996927443822013-04-23T13:27:57.647+05:302013-04-23T13:27:57.647+05:30program to find palindrome of 010
without using st...program to find palindrome of 010<br />without using string function<br />akhilesharya09@gmail.comAkhilesh Aryahttps://www.blogger.com/profile/00291498574100084221noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-84133298652810279112013-02-01T18:56:01.185+05:302013-02-01T18:56:01.185+05:30i guess there is a mistake ..it should be
sum= nu...i guess there is a mistake ..it should be <br />sum= num *10 + r;Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-33153767627275996172013-01-28T17:40:59.162+05:302013-01-28T17:40:59.162+05:30Can't understand this part:
"
for(temp=n...Can't understand this part:<br /><br />"<br />for(temp=num;num!=0;num=num/10){<br /> r=num%10;<br /> sum=sum*10+r;<br /> }"<br /><br />Please elaborate. thanks in advance!<br />Shaunak Chakrabortynoreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-26241981334956731012013-01-25T18:02:42.089+05:302013-01-25T18:02:42.089+05:30thanks ! :) thanks ! :) Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-49562042807643959572013-01-25T08:49:22.156+05:302013-01-25T08:49:22.156+05:30Here temp is any temporary variable to keep the in...Here temp is any temporary variable to keep the intermediate value.Priyanka kumarihttps://www.blogger.com/profile/08145649011863585828noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-9237277273267261632013-01-24T22:54:43.072+05:302013-01-24T22:54:43.072+05:30what is temp ? what is temp ? Anonymousnoreply@blogger.com