0 votes 0 votes The following program main( ) { int a=5,b=2; printf("%d", a +++ b); } Is it a++ + b or a + ++b ? Programming in C programming-in-c + – Shaik Masthan asked May 22, 2018 • edited May 23, 2018 by srestha Shaik Masthan 2.0k views answer comment Share Follow See all 3 Comments See all 3 3 Comments reply Shaik Masthan commented May 22, 2018 reply Follow Share According to me, scanner ( Lexical Analyzer ) scans the input from left to right and match a pattern for token and gives that lexeme to Syntax tree... From that scanner takes it as ++ then + so it would be computed as a++ + b.... 1 votes 1 votes smsubham commented May 23, 2018 reply Follow Share Read this: https://stackoverflow.com/questions/7485088/what-does-the-operation-c-ab-mean?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa https://en.wikipedia.org/wiki/Maximal_munch 1 votes 1 votes srestha commented May 24, 2018 reply Follow Share https://stackoverflow.com/questions/24943306/unary-operator-ambiguity 0 votes 0 votes Please log in or register to add a comment.
Best answer 0 votes 0 votes Yes you are right, lexical analyser will scan as a++ +b, Prateek Raghuvanshi answered May 23, 2018 • selected Feb 22, 2019 by Shaik Masthan Prateek Raghuvanshi comment Share Follow See all 0 reply Please log in or register to add a comment.