No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
[code=c] #include<stdio.h> #include<conio.h> void main() { int a[] = {10,20,30,40,50},j,*p; clrscr(); for(j=0;j<5;j++) { printf("%d",*a); a++;/*here compiler error "lvalue required"*/ } p=a; for(j=0;j<5;j++) { printf("%d",*p); p++; } getch(); } [/code] i used turbo c++ compiler.and save this programme as abc.c why this type of errors occur? |
|
|
|
[code=c] #include<stdio.h> #include<conio.h> void main() { float a=6; clrscr(); printf("%d",a); getch(); } [/code] here the output is some garbage value.here the error lies in %d instead of %f.for float value the identifier is f.is this the proper answer of my question? |