12. Look at the Code:
main()
{
int a[]={1,2,3},i;
for(i=0;i<3;i++)
{
printf("%d",*a);
a++;
}
}
Which Statement is/are True w.r.t the above code?
I.Executes Successfully & Prints the contents of the array
II.Gives the Error:Lvalue Required
III.The address of the array should not be changed
IV.None of the Above.
A)Only I B)Only II C)II & III D)IV
Answer Posted / jaleelbaig
2 gives the error because array name is nothing but a
constant pointer we cannot increment the constant pointer so
it will give error
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
Explain the difference between exit() and _exit() function?
can anyone suggest some site name..where i can get some good data structure puzzles???
What is c language used for?
Explain how can I read and write comma-delimited text?
When can a far pointer be used?
Explain union.
What is the advantage of c?
difference between Low, Middle, High Level languages in c ?
a direct address that identifies a location by means of its displacement from a base address or segment a) absolute address b) relative address c) relative mode d) absolute mode
What is logical error?
Tell me what are bitwise shift operators?
Describe the difference between = and == symbols in c programming?
What tq means in chat?
What is the best way of making my program efficient?
write a proram to reverse the string using switch case?