Bold mail body text using c

Here is an example of how you can bold the body text of an email using C:

#include <stdio.h>
#include <string.h>

int main() {
    char mailBody[] = "This is the body of the email. **This text will be bold**.";
    char *token;
    char *boldText = "**";
    char *endBoldText = "**";

    printf("Original Mail Body:\n%s\n", mailBody);

    token = strtok(mailBody, " ");
    while(token!= NULL) {
        if(strncmp(token, boldText, strlen(boldText)) == 0 && strncmp(token + strlen(token) - strlen(endBoldText), endBoldText, strlen(endBoldText)) == 0) {
            printf("<b>%s</b>\n", token);
        } else {
            printf("%s ", token);
        }
        token = strtok(NULL, " ");
    }

    return 0;
}

In this example, we're using the strtok function to split the mail body into individual words. Then, we're checking if each word starts and ends with the ** characters, which are commonly used to denote bold text in HTML. If it does, we're printing the word surrounded by <b> and </b> tags, which are used to denote bold text in HTML. If it doesn't, we're just printing the word as is.

Please note that this is a very basic example and doesn't handle all possible cases. For example, it doesn't handle nested bold text or bold text that spans multiple words. Also, it assumes that the bold text is always surrounded by ** characters, which may not always be the case.