Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

main()

{

int i=5;

printf("%d",++i++);

}

main() { int i=5; printf("%d",++i++); }..

Compiler error: Lvalue required in function main

Explanation:

++i yields an rvalue. For postfix ++ to operate an lvalue
is required.

 Is This Answer Correct ? 2 Yes 1 No

More C Code Interview Questions

main() { char i=0; for(;i>=0;i++) ; printf("%d\n",i); }

write a simple calculator c program to perform addition, subtraction, mul and div.

main() { int y; scanf("%d",&y); // input given is 2000 if( (y%4==0 && y%100 != 0) || y%100 == 0 ) printf("%d is a leap year"); else printf("%d is not a leap year"); }

main() { printf("%x",-1<<4); }

main() { int i=400,j=300; printf("%d..%d"); }

write a c program to Create employee record by taking details like name, employee id, address and phone number. While taking the phone number, take either landline or mobile number. Ensure that the phone numbers of the employee are unique. Also display all the details

What is "far" and "near" pointers in "c"...?

main() { char *p; printf("%d %d ",sizeof(*p),sizeof(p)); }

void main() { int x,y=2,z; z=(z*=2)+(x=y=z); printf("%d",z); }

Extend the sutherland-hodgman clipping algorithm to clip three-dimensional planes against a regular paralleiepiped

main() { char *str1="abcd"; char str2[]="abcd"; printf("%d %d %d",sizeof(str1),sizeof(str2),sizeof("abcd")); }

main( ) { int a[ ] = {10,20,30,40,50},j,*p; for(j=0; j<5; j++) { printf(ā%dā ,*a); a++; } p = a; for(j=0; j<5; j++) { printf(ā%d ā ,*p); p++; } }

Categories