Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Write a function to check if a number is a palindrome.

Medium

Problem Statement

Write a function to check if a number is a palindrome.

Sample Input

12321

Sample Output

12321 is a palindrome

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
#include <stdio.h> int isPalindrome(int num) { // Your code here } int main() { int num = 12321; if (isPalindrome(num)) { printf("%d is a palindrome\n", num); } else { printf("%d is not a palindrome\n", num); } return 0; }
Log in or sign up to run or submit your code.Log inSign up
Input
12321
Expected Output
12321 is a palindrome