#include <stdio.h>

int main() {

    char palavras[500];
    int j = 0;
  
    printf("Digite uma frase:\n");
    fgets(palavras, 500, stdin);

    while(palavras[j] != '\n'){
        j++;
        
    }
    palavras[j] = '\0';

    j=0;
    while(palavras[j] != '\0'){
        
        j++;
    }

    printf("\n\t j: %d\n", j);
    
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: