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 |
write a c program to add two integer numbers without using arithmetic operator +
will the program compile? int i; scanf(ā%dā,i); printf(ā%dā,i);
What is meant by realloc()?
write a program to find the frequency of a number
progrem to generate the following series 1 12 123 1234 12345
though sbi was nationalized why its not comes under nationalized banks and its comes under publicsector banks
3 Answers State Bank Of India SBI,
how to find sum of 5 digits in C?
wap in c to accept n number display the highest and lowest value
what is the use of #pragma pack, wer it is used?
what is event driven software and what is procedural driven software?
Is there any book to know about Basics of C Language?
what are two categories of clint-server application development ?