Basic and Advance C Question:
Download Job Interview Questions and Answers PDF
Is C a great language, or what?
Answer:
Is C a great language, or what? Where else could you write something like a+++++b ?
Well, you can't meaningfully write it in C, either. The rule for lexical analysis is that at each point during a straightforward left-to-right scan, the longest possible token is determined, without regard to whether the resulting sequence of tokens makes sense. The fragment in the question is therefore interpreted as
a ++ ++ + b
and cannot be parsed as a valid expression.
Well, you can't meaningfully write it in C, either. The rule for lexical analysis is that at each point during a straightforward left-to-right scan, the longest possible token is determined, without regard to whether the resulting sequence of tokens makes sense. The fragment in the question is therefore interpreted as
a ++ ++ + b
and cannot be parsed as a valid expression.
Download C Programming Interview Questions And Answers
PDF
Previous Question | Next Question |
If the assignment operator were ... | Does C have circular shift operators? |