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

Programming Exercises

Write a program to check if a string is a palindrome using pointers.

Hard

Problem Statement

Write a program to check if a string is a palindrome using pointers.

Sample Input

str = 'madam'

Sample Output

madam is a palindrome

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
#include <stdio.h> #include <string.h> int main() { char str[] = "madam"; // Logic to check if the string is a palindrome return 0; }
Log in or sign up to run or submit your code.Log inSign up
Input
str = 'madam'
Expected Output
madam is a palindrome