what is the output of following question?
void main()
{
int i=0,a[3];
a[i]=i++;
printf("%d",a[i]
}
Answer Posted / sha
Vignesh, you are right about the post incerement operation.
The a[i]=a[0] which will be assigned 0 but the printf will
print 0 as output because its printing the a[0] and not a
[1].
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is a structure member in c?
Difference between macros and inline functions? Can a function be forced as inline?
Who invented b language?
Why malloc is faster than calloc?
Can the size of an array be declared at runtime?
What's a good way to check for "close enough" floating-point equality?
When should a type cast be used?
Why does not c have an exponentiation operator?
Explain what is wrong with this program statement? Void = 10;
What is the difference between array_name and &array_name?
Why does this code crash?
What is a program flowchart and explain how does it help in writing a program?
Do you have any idea how to compare array with pointer in c?
What are static variables in c?
Is it possible to pass an entire structure to functions?