Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9257861
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:15:21+00:00 2026-06-18T12:15:21+00:00

I have encountered the following snippet: pt->aa[!!(ts->flags & MASK)] = -val; What does !!

  • 0

I have encountered the following snippet:

pt->aa[!!(ts->flags & MASK)] = -val;
  1. What does !! (double exclamation marks/ exclamation points/ two NOT operators) stand for in c?
  2. Doesn’t (!!NULL) == NULL?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T12:15:22+00:00Added an answer on June 18, 2026 at 12:15 pm

    ! is negation. So !! is negation of negation. What is important is the fact that the result will be an int.

    • !!x if x == 0 is !!0, that is !1, that is 0.
    • !!x if x != 0 is !!(!0), that is !!1, that is !0, that is 1.

    !! is used commonly if you want to convert any non-zero value to 1 while being certain that 0 remains a 0.

    And indeed, !!NULL == NULL, since !!NULL == !!0 and !!0 == !1 and finally !1 == 0.

    Consequently, in the short piece of code you cited the array subscript will be either 0 if the value of the expression in parenthesis is NULL, and 1 otherwise.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm learning C# and I encountered the following problem. I have two classes: base
I have encountered the following statement in fortran: integer iparam(11), ipntr(14) logical select(maxncv) Double
In a legacy code, I have encountered the following expression: if (!m_bMsOcs && bChannelData
More than one time I have encountered the following problem when building code with
I'm getting started with Qt and have encountered the following issue: when i compile
I am just starting working with jquery and have encountered the following problem <div
I have the following problem that other people must have encountered. I am working
We've encountered the following situation in our database. We have table 'A' and table
I have encountered with following bug (or feature) in SQL Server. When I use
I have encountered a difficulty in understanding the subroutine syntax. using the following code:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.