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
What are identifiers in c?
How many identifiers are there in c?
Is fortran still used today?
hi any body pls give me company name interview conduct "c" language only
Which header file is used for clrscr?
Is it possible to use curly brackets ({}) to enclose single line code in c program?
Write a C program linear.c that creates a sequence of
processes with a given length. By
sequence it is meant that each created process has exactly
one child.
Let's look at some example outputs for the program.
Here the entire process sequence consists of process 18181:
Sara@dell:~/OSSS$ ./linear 1
Creating process sequence of length 1.
18181 begins the sequence.
An example for a sequence of length three:
Sara@dell:~/OSSS$ ./linear 3
Creating process sequence of length 3.
18233 begins the sequence.
18234 is child of 18233
18235 is child of 18234
........ this is coad .... BUt i could not compleate it .....:(
#include
What is selection sort in c?
Write a program with dynamically allocation of variable.
What happens if a header file is included twice?
Define circular linked list.
How can I get random integers in a certain range?
plz let me know how to become a telecom protocol tester. thank you.
Why doesnt long int work?
Explain what is the purpose of "extern" keyword in a function declaration?