- Socket Programming in C/C++,
- TCP and UDP server using select,
- UDP Server-Client implementation in C
- TCP Client-Server Implementation in C
This article describes a Client and Server setup where a Client connects, sends a string to the server and the server shows the original string and sends confirmation whether the string is a palindrome or not, to the client using socket connection.
Input: naman Output: Palindrome Input: geek Output: Not Palindrome
- In this, first set up a client-server connection.
- When the connection will setup, the client will send the user input string to the server by the send system call.
- At the server-side, the server will wait for a string sent by the client.
- Server reads the string by the reading system call.
- After this, the server will check if the string is a palindrome or not and sends the confirmation back to the client.
- First, run the server program as
gcc server.c -o server ./server
- Run the client program on another terminal
gcc client.c -o client ./client
- Server program is waiting for the string sent by the client.
- Input the string in client-side.
- Server program will print original string.
- Client program will print result.
Below is the implementation of the above approach:
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- C Program to Check if a Given String is Palindrome
- Java program to check whether a string is a Palindrome
- Python program to check if given string is vowel Palindrome
- Check if a given string is Even-Odd Palindrome or not
- Program to check if an Array is Palindrome or not using STL in C++
- Program to check the number is Palindrome or not
- Program to check if an Array is Palindrome or not
- Check whether the given string is Palindrome using Stack
- Check if it is possible to create a palindrome string from given N
- Check given string is oddly palindrome or not | Set 2
- Check if a given string is a rotation of a palindrome
- Check if a string is palindrome in C using pointers
- Check if any anagram of a string is palindrome or not
- Check if both halves of a string are Palindrome or not
- Check given string is oddly palindrome or not
- Recursive program to check if number is palindrome or not
- Bash program to check if the Number is a Palindrome
- Program to check if an array is palindrome or not using Recursion
- Check if there exists any sub-sequence in a string which is not palindrome
- Recursive function to check if a string is palindrome
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.