asked 19.6k views
5 votes
Which of the following is the Boolean logical operator for AND in C#?

asked
User Sandeeps
by
9.2k points

1 Answer

7 votes
char *pch = 0; ... (pch) && (*pch = 'a');

heres an example

// expre_Logical_AND_Operator.cpp // compile with: /EHsc // Demonstrate logical AND #include <iostream> using namespace std; int main() { int a = 5, b = 10, c = 15; cout << boolalpha << "The true expression " << "a < b && b < c yields " << (a < b && b < c) << endl << "The false expression " << "a > b && b < c yields " << (a > b && b < c) << endl;
answered
User Peter Bratton
by
8.1k points

Related questions

2 answers
5 votes
83.0k views
1 answer
2 votes
32.1k views
1 answer
3 votes
8.0k views