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

  • SEARCH
  • Home
  • 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 6186419
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T01:53:10+00:00 2026-05-24T01:53:10+00:00

The C Operator Preference Table notes the higher precedence of () . Code: #

  • 0

The C Operator Preference Table notes the higher precedence of ().

Code:

# include <stdio.h>
int main()
{
    int temp=2;
    (temp += 23)++;    //Statement 1
    ++(temp += 23);    //Statement 2
    printf("%d",temp);
    return 0;
}

My question is while parentheses has higher precedence than pre-fix operator in Statement 2 why there’s an error.
In Statement 1 both has same precedence but order of evaluation is from left to right. Still the same error.
Third doubt: operator += has much lower precedence, then why it’s causing error.

error: lvalue required as increment operand
  • 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-05-24T01:53:11+00:00Added an answer on May 24, 2026 at 1:53 am

    An lvalue is a value that some other value can be assigned to (because it is on the left side of the assignment operator). (temp += 23) is a rvalue. Nothing can be assigned to it.

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

Sidebar

Related Questions

The operator precedence table I can find is: https://developer.mozilla.org/en/JavaScript/Reference/Operators/Operator_Precedence according to the table, both
What is the operator precedence order in Visual Basic 6.0 (VB6)? In particular, for
Should the programmer be aware of operator precedence thoroughly? Using braces to group expressions
bool operator()(Iterator it1, Iterator it2) const { return (*it1 < *it2); } Can someone
Why does the sizeof operator return a size larger for a structure than the
I like Scala's propose of operator precedence but in some rare cases, unmodified rules
I have a homework question regarding operator precedence in Fortran. In order to understand
How is operator precedence implemented in ANTLR? I'm using the XText/Antlr package at the
In one example from http://leepoint.net/notes-java/data/expressions/precedence.html The following expression 1 + 2 - 3 *
The terms 'operator precedence' and 'order of evaluation' are very commonly used terms in

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.