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
How does pointer work in c?
List the different types of c tokens?
What is structure pointer in c?
When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd
What is a scope resolution operator in c?
I just typed in this program, and it is acting strangely. Can you see anything wrong with it?
How does sizeof know array size?
what do u mean by Direct access files? then can u explain about Direct Access Files?
What is the use of header files?
What are qualifiers?
Write a program to implement a round robin scheduler and calculate the average waiting time.Arrival time, burst time, time quantum, and no. of processes should be the inputs.
What are the different types of control structures in programming?
Differentiate between static and dynamic modeling.
Tell me about low level programming languages.
Explain the process of converting a Tree into a Binary Tree.