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 |
array of pointer pointer to array pointer to pointer
What are volatile variables in c?
#include<stdio.h> main() { char s1[]="Ramco"; char s2[]="Systems"; s1=s2; printf("%s",s1); } Find the output
Which is the memory area not included in C program? give the reason
How can I find the modification date and time of a file?
disadvantages of realloc ?
Is c functional or procedural?
What is the difference b/w Structure & Union?
How do you convert a decimal number to its hexa-decimal equivalent.Give a C code to do the same
What do you mean by c what are the main characteristics of c language?
what is the difference between definition and declaration? give me some examples.
How can I remove the leading spaces from a string?