what is the output of following question?
void main()
{
int i=0,a[3];
a[i]=i++;
printf("%d",a[i]
}
Answer Posted / vignesh1988i
my opinion or wat i think is that ,
a[i]=i++; is given so...
here i++ is a post increment operation , so first it will assign the value to a[0]=0 , so a[0] will have 0 , and in next line a[i] is given in printf , so the value a[1] should get printed that will be garbage value.......
thank u
Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
What are static variables in c?
What are directives in c?
What does malloc () calloc () realloc () free () do?
What is data structure in c programming?
Why is c not oop?
What is integer constants?
What is the right way to use errno?
Is there anything like an ifdef for typedefs?
What is data structure in c and its types?
What is c preprocessor mean?
What is wrong with this code?
How can you convert integers to binary or hexadecimal?
Explain a pre-processor and its advantages.
How do we open a binary file in Read/Write mode in C?
How can I find the modification date and time of a file?