+ 7
Usually get wrong outputs in C++, how to get it accurate?
for some exceptions i get it but in most of the cases my output in C++ goes wrong and sometimes its kinda stuck that how is this coming? please explain
8 ответов
+ 10
hello Afrin Fatima, to get a helpfull answer it will be better you show your code in your question, its possible to add a code to your question 👍😉
+ 13
#include <iostream>
using namespace std;
int main() {
int a = 1;
int b = 0;
cout<<(!(a||b))&&(!b);
return 0;
}
copy this code in your codeplay ground and play a little bit with this code, delete one !, delete both !, delete the parenthesis and see what happen
+ 9
@ Afrin Fatima, thank you very much for marking my answer as best 👍😉
+ 9
the output is a boolean answer, because of the parenthesis, 0 = false and 1 = true, and because of the ! your output is 0
+ 9
is this helpfull for you?
+ 6
ok
+ 6
what is the output of this code?
int a=1;
int b= 0;
cout<<(!(a||b))&&(!b);
+ 5
welcome:)