+ 1
Is it possible to make both condition in if else to true and print corresponding following statements for both
6 odpowiedzi
+ 12
No. Your else statement is always the complement of your if statement and will only run when your if statement is false.
+ 7
You Can't!
+ 6
@prijesh, if the condition is true and the if statement is executed then else statement will be skipped likewise if condition is false it will skip the if statement and execute the else statement.
+ 2
Yes u can
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
if (!(printf("hello")))
;
else
printf("bye");
getch();
}
//we all know that printf(), scanf(), exit() returns zero hence by adding ! It makes the value false so it prints if statement as well as else statement and the symbol ; terminates the statement :3
/*now apply this trick with all ur frnds n njoy*/ ;)
The code is being fully tested and this is how the output looks like with both if and else statement
+ 1
hasty rei is it possible to print something in if condition and make it false to print else condition
0
@Mr.robot I am trying to say like if(print()==0)else print()