1

The code is showing compile error "lvalue required as left operand of assignment".I am not able to understand why it occurs. Can anybody explain it?

#include <stdio.h> 
void main() {
 int k=8;
 int m=7;
 k<m ? k=k+1 : m=m+1;
 printf("%d",k);
}
grrigore
  • 1,050
  • 1
  • 21
  • 39
shweta jha
  • 21
  • 1
  • 1
    Hi there--this question needs some clean-up on your part before it can be useful to the community. 1) Put your code in the body, not the title. 2) Write a better title that properly reflects the actual error you receive. 3) Don't spam tags. This has absolutely nothing to do with Java. – nanofarad Jun 29 '19 at 18:24

0 Answers0