1. Double branch

/* Note: Your choice is C IDE */
#include "stdio.h"
void main()
{
int x=-1;
if(x==-1)
{
printf("true");
printf("true" );
printf("true");
printf("true");
}
else
{
printf("false");
printf("false");
printf("false");
printf("false");
}

// If there are more than two sentences between if and else, they must be enclosed in curly brackets.
//As long as the expression in the parentheses is true, execute all the code between if and else, and then execute the non-else code.
//If the expression in the parentheses is false, execute all the code in the braces after the else, if there are no braces, execute the sentence closest to the else.
}

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325892601&siteId=291194637
Recommended