Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions programs/C/Untitled1.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#include <stdio.h>
#include <string.h>

int main(){

int n;
printf("enter string size\n");
scanf("%d",&n);
char string[n],string2[n];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep the indentation uniform!!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still not addressed @NEEHITGOYAL

printf("Enter a string to check palindrome\n");
scanf("%s",&string);
strcpy(string2,string);
strrev(string2);
if(strcmp(string,string2) == 0)
printf("the string is palindrome\n");
else
printf("the string is not palindrome\n");

return 0;
}