0 votes 0 votes #include<stdio.h> void foo(int*) int main() { int i=10; foo((&i)++); } void foo(int*p) { printf(%d\n",*p); } A)10 B)Some garbage value C) Compile time Error D)Segmentation Fault/Code Crash neha singh asked May 15, 2017 • edited May 16, 2017 by srestha neha singh 316 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 2 votes 2 votes C) Compile time Error Whenever we are trying to increment or decrement Constant Expression. L-value error will come Angkit answered May 15, 2017 • selected May 15, 2017 by neha singh Angkit comment Share Follow See 1 comment See all 1 1 comment reply A_i_$_h commented Jun 18, 2017 reply Follow Share but sometimes when a pointer is pointing to something (i.e) has the address of a variable stored now when the pointer is incremented it give the next address value in that case it works how? why it doesnt show L- value error 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes C..i think it will give L value error?? joshi_nitish answered May 15, 2017 joshi_nitish comment Share Follow See all 0 reply Please log in or register to add a comment.