0
I made a source code in C, conditional, but when I add a printf function windows reports that the program stopped running. Look at the code: 1: http://i.stack.Imgur.com/a9YUf.png
NOTE: I USE WINDOWS 7 HOME BASIC, AND MY EDITOR AND COMPILER IS DEVC++, IF IT INTERFERES WITH ANYTHING LET ME KNOW, PLEASE. AND IF IT’S A HARDWARE PROBLEM, AND LET ME KNOW
#include <stdio.h>
int main(void) {
int valor = 3;
char resultado;
if(valor = 1){
resultado = 's';
}else{
resultado = 'n';
}
printf("a resposta é:%s", resultado);
}
Enter the code in your question. To edit: http://answall.com/posts/118452/edit
– rubStackOverflow
The code in the question must be the original code - not the corrected code after the answers - otherwise it will confuse future readers who may have the same doubt (and leave the answers meaningless)
– jsbueno