🕷️ Crawler Inspector

URL Lookup

Direct Parameter Lookup

Raw Queries and Responses

1. Shard Calculation

Query:
Response:
Calculated Shard: 169 (from laksa145)

2. Crawled Status Check

Query:
Response:

3. Robots.txt Check

Query:
Response:

4. Spam/Ban Check

Query:
Response:

5. Seen Status Check

ℹ️ Skipped - page is already crawled

đź“„
INDEXABLE
âś…
CRAWLED
10 hours ago
🤖
ROBOTS ALLOWED

Page Info Filters

FilterStatusConditionDetails
HTTP statusPASSdownload_http_code = 200HTTP 200
Age cutoffPASSdownload_stamp > now() - 6 MONTH0 months ago
History dropPASSisNull(history_drop_reason)No drop reason
Spam/banPASSfh_dont_index != 1 AND ml_spam_score = 0ml_spam_score=0
CanonicalPASSmeta_canonical IS NULL OR = '' OR = src_unparsedNot set

Page Details

PropertyValue
URLhttps://builtin.com/articles/c-or-and
Last Crawled2026-04-09 03:11:19 (10 hours ago)
First Indexed2024-09-24 03:45:17 (1 year ago)
HTTP Status Code200
Meta TitleC++ Or, And and Not Logical Operators Explained | Built In
Meta DescriptionIn modern C++, or and and not are keywords that can be used to replace the boolean opeartors &&, || and !, respectively. Learn more.
Meta Canonicalnull
Boilerpipe Text
In modern C++ , you can use and , or and not as boolean operators , which means && , || and ! respectively. This makes them identical to languages like Python . These operators were in C as macros, but modern C++ introduced them as keywords. # include <iostream> int main () { std::cout << true and true << std::endl; std::cout << true or false << std::endl; std::cout << not true << std::endl; return 0 ; } This is exactly identical to: # include <iostream> int main () { std::cout << true && true << std::endl; std::cout << true || false << std::endl; std::cout << ! true << std::endl; return 0 ; } You can probably use any one of the styles depending on your codebase. What are the C++ And, Or and Not Operators and , or and not are boolean operators that were introduced as keywords in modern C++. Here’s how they work: And : The and operator is equivalent to && and issued to evaluate two expressions, returning true only if both expressions are true . Or : The or operator is equivalent to '' and is used to evaluate two expressions, returning true only if one expression is true . Not : The not operator is equivalent to ! and is used to invert boolean values. C++ Or, And and Not Logical Operators Explained With Code Below you’ll find an explanation of how the and, or and not operators in C++ work, along with sample code. 1. And Operator C++ and operator is used for boolean evaluations between boolean values. It is equivalent to && operator. Both are used to evaluate two expressions and return true only if both expressions are true . Otherwise, it returns false . And Operator Syntax bool and bool And Operator Code Example # include <iostream> using namespace std; int main () { bool a = true ; bool b = false ; if (a and b) { cout << "Both are true" << endl; } else { cout << "One or both are false" << endl; } return 0 ; } More on Software Engineering STD::Optional in C++: A Guide 2.Or Operator C++ or operator is used for boolean evaluations between boolean values. It is equivalent to the  || operator. Both are used to evaluate two expressions and return true only if one expressions is true . Otherwise, it returns false . Or Operator Syntax bool or bool Or Operator Code Example # include <iostream> using namespace std; int main () { bool a = true ; bool b = false ; if (a or b) { cout << "One is true" << endl; } else { cout << "Both are false" << endl; } return 0 ; } A tutorial on how to use logical operators in C++. | Video: Tech With Tim More on Software Engineering C++ Lambda Expressions Explained 3. Not Operator C++ not operator is used to invert boolean values. Not true becomes false and not false becomes true . Not Operator Syntax not bool ean_value Not Operator Code Example # include <iostream> using namespace std; int main () { bool a = true ; if ( not a) { cout << "a is now false" << endl; } else { cout << "a is still true" << endl; } return 0 ; } Even though and , or and not are introduced as keywords, many codebases still use the symbolic form and these should be used when really needed. In modern C++, the logical operators && , '' and ! are represented as the keywords and , or and not respectively. They are used to compare boolean values. The logical operators in C++ work as follows: And : The and keyword is used in place of && to compare two values, returning true only if both values are true . Or : The or keyword is used in place of '' and is used to compare two values, returning true only if one value is true . Not : The not keyword is used in place of ! , allowing the user to invert boolean values. 
Markdown
[![Built In Logo](https://static.builtin.com/dist/images/bi-header-logo.svg) ![Built In Logo](https://static.builtin.com/dist/images/bi-header-logo.svg)](https://builtin.com/) [In Jobs](https://builtin.com/jobs?search=) [View All Jobs](https://builtin.com/jobs) [For Employers](https://employers.builtin.com/?utm_medium=BIReferral&utm_source=foremployers) [Join](https://builtin.com/auth/signup?destination=%2Farticles%2Fc-or-and) [Log In](https://builtin.com/auth/login?destination=%2Farticles%2Fc-or-and) - [Jobs](https://builtin.com/jobs) - [Companies](https://builtin.com/companies) - [Remote](https://builtin.com/jobs/remote) - [Articles](https://builtin.com/tech-topics) - [Salaries](https://builtin.com/salaries) - [Best Places To Work](https://builtin.com/awards/us/2026/best-places-to-work) - [Job Application Tracker](https://builtin.com/auth/login?destination=%2Fhome%23application-tracker-section) - [Software Engineering Perspectives](https://builtin.com/tag/software-engineering-perspectives "Software Engineering Perspectives") - [Expert Contributors](https://builtin.com/tag/expert-contributors "Expert Contributors") - [Software Engineering](https://builtin.com/tag/software-engineering "Software Engineering") - \+1 - [C++](https://builtin.com/tag/c-plus-plus "C++") - \+3 # A Guide to C++ Or, And and Not Logical Operators In modern C++, or and and not are keywords that can be used to replace the boolean opeartors &&, \|\| and !, respectively. Learn more. ![Swastik Baranwal](https://cdn.builtin.com/cdn-cgi/image/f=auto,w=96,h=96,q=100/sites/www.builtin.com/files/2024-09/Swastik%20Baranwal.jpeg) Written by [Swastik Baranwal](https://builtin.com/authors/swastik-baranwal) Published on Sep. 23, 2024 ![Developer writing code in C++](https://cdn.builtin.com/cdn-cgi/image/f=auto,fit=cover,w=320,h=200,q=80/sites/www.builtin.com/files/2024-09/c-or-and.png) Image: Shutterstock / Built In ![Brand Studio Logo](https://static.builtin.com/dist/images/expert-badge.svg) In modern [C++](https://builtin.com/software-engineering-perspectives/c-plus-plus), you can use `and`, `or` and `not` as [boolean operators](https://builtin.com/data-science/and-in-r), which means `&&`, `||` and `!` respectively. This makes them identical to languages like [Python](https://builtin.com/software-engineering-perspectives/python). These operators were in C as macros, but modern C++ introduced them as keywords. ``` #include <iostream> int main() { std::cout << true and true << std::endl; std::cout << true or false << std::endl; std::cout << not true << std::endl; return 0; } ``` This is exactly identical to: ``` #include <iostream> int main() { std::cout << true && true << std::endl; std::cout << true || false << std::endl; std::cout << !true << std::endl; return 0; } ``` You can probably use any one of the styles depending on your codebase. ## What are the C++ And, Or and Not Operators `and`, `or` and `not` are boolean operators that were introduced as keywords in modern C++. Here’s how they work: 1. `And`: The `and` operator is equivalent to `&&` and issued to evaluate two expressions, returning `true` only if both expressions are `true`. 2. `Or`: The or operator is equivalent to `''` and is used to evaluate two expressions, returning `true` only if one expression is `true`. 3. `Not`: The not operator is equivalent to `!` and is used to invert boolean values. ## C++ Or, And and Not Logical Operators Explained With Code Below you’ll find an explanation of how the and, or and not operators in C++ work, along with sample code. ### 1\. And Operator C++ `and` operator is used for boolean evaluations between boolean values. It is equivalent to `&&` operator. Both are used to evaluate two expressions and return `true` only if both expressions are `true`. Otherwise, it returns `false`. #### And Operator Syntax ``` bool and bool ``` #### And Operator Code Example ``` #include <iostream> using namespace std; int main() { bool a = true; bool b = false; if (a and b) { cout << "Both are true" << endl; } else { cout << "One or both are false" << endl; } return 0; } ``` More on Software Engineering[STD::Optional in C++: A Guide](https://builtin.com/articles/stdoptional) ### 2\.Or Operator C++ `or` operator is used for boolean evaluations between boolean values. It is equivalent to the `||` operator. Both are used to evaluate two expressions and return `true` only if one expressions is `true`. Otherwise, it returns `false`. #### Or Operator Syntax ``` bool or bool ``` Or Operator Code Example ``` #include <iostream> using namespace std; int main() { bool a = true; bool b = false; if (a or b) { cout << "One is true" << endl; } else { cout << "Both are false" << endl; } return 0; } ``` A tutorial on how to use logical operators in C++. \| Video: Tech With Tim More on Software Engineering[C++ Lambda Expressions Explained](https://builtin.com/software-engineering-perspectives/c-plus-plus-lambda) ### 3\. Not Operator C++ `not` operator is used to invert boolean values. `Not true` becomes `false` and `not false` becomes `true`. #### Not Operator Syntax ``` not boolean_value ``` #### Not Operator Code Example ``` #include <iostream> using namespace std; int main() { bool a = true; if (not a) { cout << "a is now false" << endl; } else { cout << "a is still true" << endl; } return 0; } ``` Even though `and`, `or` and `not` are introduced as keywords, many codebases still use the symbolic form and these should be used when really needed. ## Frequently Asked Questions ### What are the logical operators in C++? In modern C++, the logical operators `&&`, `''` and `!` are represented as the keywords `and`, `or` and `not` respectively. They are used to compare boolean values. ### How do logical operators work in C++? The logical operators in C++ work as follows: - `And`: The and keyword is used in place of `&&` to compare two values, returning `true` only if both values are `true`. - `Or`: The `or` keyword is used in place of `''` and is used to compare two values, returning `true` only if one value is `true`. - `Not`: The `not` keyword is used in place of `!`, allowing the user to invert boolean values. ### Recent Software Engineering Perspectives Articles [![42 Companies Hiring Entry-Level Engineers](https://cdn.builtin.com/cdn-cgi/image/f=auto,fit=contain,w=120,h=70,q=80/sites/www.builtin.com/files/2024-04/shutterstock_1682713576.jpg) 42 Companies Hiring Entry-Level Engineers](https://builtin.com/articles/companies-hiring-engineers-entry-level) [![127 SaaS Companies to Know](https://cdn.builtin.com/cdn-cgi/image/f=auto,fit=contain,w=120,h=70,q=80/sites/www.builtin.com/files/2022-07/cloud-connection-saas-companies_2.png) 127 SaaS Companies to Know](https://builtin.com/articles/saas-companies) [![103 Software Development Companies Innovating Tech](https://cdn.builtin.com/cdn-cgi/image/f=auto,fit=contain,w=120,h=70,q=80/sites/www.builtin.com/files/software-development-companies_3.jpg) 103 Software Development Companies Innovating Tech](https://builtin.com/articles/software-development-companies) Explore Job Matches. Job Title or Keyword Clear search Location Fully Remote, Hybrid, On Site Fully Remote Hybrid On Site Clear Apply See Jobs - [Jobs](https://builtin.com/jobs) - [Companies](https://builtin.com/companies) - [Articles](https://builtin.com/tech-topics) - [Tracker](https://builtin.com/auth/login?destination=%2Fhome%23application-tracker-section) - More ![Built In](https://static.builtin.com/dist/images/midnight_9.svg) [Join](https://builtin.com/auth/signup?destination=%2Farticles%2Fc-or-and) [Log In](https://builtin.com/auth/login?destination=%2Farticles%2Fc-or-and) - [Tech Jobs](https://builtin.com/jobs) - [Companies](https://builtin.com/companies) - [Articles](https://builtin.com/tech-topics) - [Remote](https://builtin.com/jobs/remote) - [Salaries](https://builtin.com/salaries) - [Best Places To Work](https://builtin.com/awards/us/2026/best-places-to-work) - [Tech Hubs](https://builtin.com/tech-hubs) [Post Job](https://employers.builtin.com/membership?utm_medium=BIReferral&utm_source=foremployers) [![BuiltIn](https://static.builtin.com/dist/images/builtin-logo.svg)](https://builtin.com/) ![United We Tech](https://static.builtin.com/dist/images/united-we-tech.svg) Built In is the online community for startups and tech companies. Find startup jobs, tech news and events. About [Our Story](https://builtin.com/our-story) [Careers](https://employers.builtin.com/careers/) [Our Staff Writers](https://builtin.com/our-staff) [Content Descriptions](https://builtin.com/content-descriptions) *** Get Involved [Recruit With Built In](https://employers.builtin.com/membership?utm_medium=BIReferral&utm_source=foremployers) [Become an Expert Contributor](https://builtin.com/expert-contributors) *** Resources [Customer Support](https://knowledgebase.builtin.com/s/) [Share Feedback](https://form.jotform.com/223044927257054) [Report a Bug](https://knowledgebase.builtin.com/s/contactsupport) [Tech Job Tools + Career Resources](https://builtin.com/articles/grow-your-career) [Browse Jobs](https://builtin.com/browse-jobs) [Tech A-Z](https://builtin.com/tech-dictionary) *** Tech Hubs [Our Sites](https://builtin.com/our-sites) *** [Learning Lab User Agreement](https://builtin.com/learning-lab-user-agreement) [Accessibility Statement](https://builtin.com/accessibility-statement) [Copyright Policy](https://builtin.com/copyright-policy) [Privacy Policy](https://builtin.com/privacy-policy) [Terms of Use](https://builtin.com/community-terms-of-use) [Your Privacy Choices/Cookie Settings](https://builtin.com/california-do-not-sell-my-information) [CA Notice of Collection](https://builtin.com/ca-notice-collection) © Built In 2026
Readable Markdown
In modern [C++](https://builtin.com/software-engineering-perspectives/c-plus-plus), you can use `and`, `or` and `not` as [boolean operators](https://builtin.com/data-science/and-in-r), which means `&&`, `||` and `!` respectively. This makes them identical to languages like [Python](https://builtin.com/software-engineering-perspectives/python). These operators were in C as macros, but modern C++ introduced them as keywords. ``` #include <iostream> int main() { std::cout << true and true << std::endl; std::cout << true or false << std::endl; std::cout << not true << std::endl; return 0; } ``` This is exactly identical to: ``` #include <iostream> int main() { std::cout << true && true << std::endl; std::cout << true || false << std::endl; std::cout << !true << std::endl; return 0; } ``` You can probably use any one of the styles depending on your codebase. ## What are the C++ And, Or and Not Operators `and`, `or` and `not` are boolean operators that were introduced as keywords in modern C++. Here’s how they work: 1. `And`: The `and` operator is equivalent to `&&` and issued to evaluate two expressions, returning `true` only if both expressions are `true`. 2. `Or`: The or operator is equivalent to `''` and is used to evaluate two expressions, returning `true` only if one expression is `true`. 3. `Not`: The not operator is equivalent to `!` and is used to invert boolean values. ## C++ Or, And and Not Logical Operators Explained With Code Below you’ll find an explanation of how the and, or and not operators in C++ work, along with sample code. ### 1\. And Operator C++ `and` operator is used for boolean evaluations between boolean values. It is equivalent to `&&` operator. Both are used to evaluate two expressions and return `true` only if both expressions are `true`. Otherwise, it returns `false`. #### And Operator Syntax ``` bool and bool ``` #### And Operator Code Example ``` #include <iostream> using namespace std; int main() { bool a = true; bool b = false; if (a and b) { cout << "Both are true" << endl; } else { cout << "One or both are false" << endl; } return 0; } ``` More on Software Engineering[STD::Optional in C++: A Guide](https://builtin.com/articles/stdoptional) ### 2\.Or Operator C++ `or` operator is used for boolean evaluations between boolean values. It is equivalent to the `||` operator. Both are used to evaluate two expressions and return `true` only if one expressions is `true`. Otherwise, it returns `false`. #### Or Operator Syntax ``` bool or bool ``` Or Operator Code Example ``` #include <iostream> using namespace std; int main() { bool a = true; bool b = false; if (a or b) { cout << "One is true" << endl; } else { cout << "Both are false" << endl; } return 0; } ``` A tutorial on how to use logical operators in C++. \| Video: Tech With Tim More on Software Engineering[C++ Lambda Expressions Explained](https://builtin.com/software-engineering-perspectives/c-plus-plus-lambda) ### 3\. Not Operator C++ `not` operator is used to invert boolean values. `Not true` becomes `false` and `not false` becomes `true`. #### Not Operator Syntax ``` not boolean_value ``` #### Not Operator Code Example ``` #include <iostream> using namespace std; int main() { bool a = true; if (not a) { cout << "a is now false" << endl; } else { cout << "a is still true" << endl; } return 0; } ``` Even though `and`, `or` and `not` are introduced as keywords, many codebases still use the symbolic form and these should be used when really needed. In modern C++, the logical operators `&&`, `''` and `!` are represented as the keywords `and`, `or` and `not` respectively. They are used to compare boolean values. The logical operators in C++ work as follows: - `And`: The and keyword is used in place of `&&` to compare two values, returning `true` only if both values are `true`. - `Or`: The `or` keyword is used in place of `''` and is used to compare two values, returning `true` only if one value is `true`. - `Not`: The `not` keyword is used in place of `!`, allowing the user to invert boolean values.
Shard169 (laksa)
Root Hash7607033694470393769
Unparsed URLcom,builtin!/articles/c-or-and s443