# Lvalue require


#1

int main()
{
char ch[5] = “GATE”;
char *ptr = ch;
while(*ch++)
{
printf("%c",*ch);
}

return 0;
}

why this code gives Lvalue require error ?


#2

L stands for left. in while condition… you are giving an constant value. ch is an character array. and simply writing ch denotes that character array and ch means the base address of that array. *ch means that, the value present at base address. value is constant. in while condition, you are giving a constant character value, which is not accepted