main()
{
int i = 1;
int num[] = {1,2,3,4};
num[i] = i++;
printf("%d", num[i]);
}
what will be the output?
}
Answer Posted / pragathi
3 is the answer bcoz
i=1
num[i]=i++;
num[1]=2;
here i=2
printf("%d", num[2]);
here 3 is there at position 2 .
so answer is 3
| Is This Answer Correct ? | 19 Yes | 3 No |
Post New Answer View All Answers
What are loops in c?
main() { int i = 10; printf(" %d %d %d ", ++i, i++, ++i); }
A SIMPLE PROGRAM OF GRAPHICS AND THEIR OUTPUT I WANT SEE WAHAT OUTOUT OF GRAPHICS PROGRAM
When c language was developed?
what is the c source code for the below output? 10 10 10 10 10 10 10 10 10 10 9 9 7 6 6 6 6 6 6 9 7 5 9 7 3 2 2 5 9 7 3 1 5 9 7 3 5 9 7 4 4 4 4 5 9 7 8 8 8 8 8 8 8 8 9
What is #define size in c?
What is property type c?
Which is the best website to learn c programming?
What does main () mean in c?
How do we declare variables in c?
The performance of an operation in several steps with each step using the output of the preceding step a) recursion b) search c) call by value d) call by reference
Explain how do you list files in a directory?
Why is c called c not d or e?
What's the total generic pointer type?
What is spaghetti programming?