Condition error in string vector in C [duplicate]

0

I'm having difficulty with a specific exercise:

#include <stdio.h>
#include <stdlib.h>
#include <locale.h>
#include <windows.h>
#include <ctype.h>
#include <string.h>

/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char *argv[]) {
    setlocale(LC_ALL, "portuguese");

    char nome[0][50], hoje[0][50];

    printf("Digite o nome do local: ");

    scanf("%s", &nome[0]);

    printf("Digite o dia: ");

    scanf("%s", &hoje[0]);
    toupper((char)hoje);

    if((hoje[0] == "SEGUNDA") && (strlen(nome) < 100)){
        printf("Nome é: %s\n", nome[0]);
        printf("Hoje é: SEGUNDA\n");
    }else if((hoje[0] == "TERÇA") && (strlen(nome) < 100)){
        printf("Nome é: %s\n", nome[0]);
        printf("Hoje é: TERÇA\n");
    }else{
        printf("Dia da semana nao é SEGUNDA e nem TERÇA");
    }

    system("pause >> null");
    return 0;
}

When compiled, it does not consider if and pauses the program after the inputs and inverting the condition if(!(hoje[0] == "SEGUNDA") && (strlen(nome) < 100)) with the ! it printa, but exits eg: Seu nome é: SEGUNDA, Hoje é: SEGUNDA it replaces the variable name for today when printa to output, what can it be? address or allocation? Thank you.

    
asked by anonymous 06.09.2018 / 21:19

0 answers