This is as easy as just sending send_data instead of hexstring, isn't it?

So change this...

Code:
printf("Type Something (q or Q to quit):");
gets(send_data);

if ((strcmp(send_data , "q") == 0) || strcmp(send_data , "Q") == 0)
break;

else

// Converting entered string into hexadecimal using sprintf()
hexstring[0] = '\0';
temp[0] = '\0';

for (i=0; i<strlen(send_data); i++)
{
	sprintf(temp, "%X ", send_data);
	strcat(hexstring, temp);
}
sendto(sock,hexstring, strlen(hexstring), 0,(struct sockaddr *)&server_addr, sizeof(struct sockaddr));
- which won't work by the way, because this is equivalent to

Code:
if ((strcmp(send_data , "q") == 0) || strcmp(send_data , "Q") == 0)
break;

else
{
	// Converting entered string into hexadecimal using sprintf()
	hexstring[0] = '\0';
}
temp[0] = '\0';

for (i=0; i<strlen(send_data); i++)
{
	sprintf(temp, "%X ", send_data);
	strcat(hexstring, temp);
}
sendto(sock,hexstring, strlen(hexstring), 0,(struct sockaddr *)&server_addr, sizeof(struct sockaddr));
... to this:

Code:
printf("Type Something (q or Q to quit):");
gets(send_data);

if ((strcmp(send_data , "q") == 0) || strcmp(send_data , "Q") == 0)
break;

else
{
	sendto(sock,send_data, strlen(send_data), 0,(struct sockaddr *)&server_addr, sizeof(struct sockaddr));
}
hraja like this