main()
{
int i = 1;
int num[] = {1,2,3,4};
num[i] = i++;
printf("%d", num[i]);
}
what will be the output?
}
Answer Posted / ismail
2 is the ans
num[i]=i++
num[1]=2
now num[1] is changed with 2(same as the previous value)
now to print num[i]=num[1] right?
its 2 which is in num[1] solved!!!!
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
What are multibyte characters?
How can you avoid including a header more than once?
What does a derived class inherit from a base class a) Only the Public members of the base class b) Only the Protected members of the base class c) Both the Public and the Protected members of the base class d) .c file
What is context in c?
Explain what does a function declared as pascal do differently?
Explain what is a stream?
How do you use a 'Local Block'?
program to find error in linklist.(i.e find whether any node point wrongly to previous nodes instead of next node)
How variables are declared in c?
Where local variables are stored in c?
#define MAX(x,y) (x) >(y)?(x):(y) main() { inti=10,j=5,k=0; k= MAX(i++,++j); printf("%d..%d..%d",i,j,k); }
What are all different types of pointers in c?
Explain 'far' and 'near' pointers in c.
What is the use of function overloading in C?
What is structure padding in c?