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
Answers were Sorted based on User's Feedback
Answer / 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 |
biggest of two no's with out using if condition statement
write a program which counts a product of array elements lower than 10.
What are the 32 keywords in c?
How do shell structures work?
What are the 4 types of organizational structures?
Why isn't it being handled properly?
What are structures and unions? State differencves between them.
What is pass by value in c?
Explain what’s a signal? Explain what do I use signals for?
WHICH TYPE OF JOBS WE GET BY WRITING GROUPS .WHEN THE EXAMS CONDUCTED IS THIS EXAMS ARE CONDUCTED EVERY YEAR OR NOT.PLS TELL ME THE ANSWER
Add 2 64 bit numbers on a 32 bit machine
3 Answers EMC, Hyderabad Central University, NetApp,
What is maximum size of array in c?