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 remove all the duplicate characters in a string and replace with single character? ex:-input- AAABBBCCC output- ABC
a memory of 20 bytes is allocated to a string declared as char *s then the following two statements are executed: s="Etrance" l=strlen(s); what is the value of l ? a.20 b.8 c.9 d.21
What does c in a circle mean?
What is the correct declaration of main?
How we can set and clear bit in a byte using macro function?
Write an algorithm for a program that receives an integer as input and outputs the product of of its digits. E.g. 1234 = 24, 705 = 0
What tq means in chat?
What is the concatenation operator?
main() { printf("\n %d %d %d",sizeof('3'),sizeof("3"),sizeof(3)); } wat is the o/p and how?
how to find out the reverse number of a digit if it is input through the keyboard?
What are c header files?
By using C language input a date into it and if it is right?