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 / rakesh
B)only 2
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
Explain what are the different file extensions involved when programming in c?
Why pointers are used in c?
Is c a great language, or what?
What are the 4 types of functions?
If a variable is a pointer to a structure, then which operator is used to access data members of the structure through the pointer variable?
Can a pointer point to null?
What are the types of variables in c?
What does the && operator do in a program code?
What does void main () mean?
Is c procedural or object oriented?
Explain how can a program be made to print the line number where an error occurs?
Explain the difference between malloc() and calloc() function?
Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?
Is there any algorithm to search a string in link list in the minimum time?(please do not suggest the usual method of traversing the link list)
What is pointers in c with example?