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 is local and global variable in c?
What does c in a circle mean?
What are structural members?
How can I read data from data files with particular formats?
Are there constructors in c?
What is the advantage of c?
int far *near * p; means
What is sorting in c plus plus?
Is c dynamically typed?
What are the advantages of c preprocessor?
Why is this loop always executing once?
Is main is user defined function?
Write a program of advanced Fibonacci series.
What is the easiest sorting method to use?
Write a program to swap two numbers without using third variable in c?