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
Can we initialize extern variable in c?
Can we compile a program without main() function?
What is the purpose of type declarations?
What is c variable?
I have written a pro*C program to fetch data from the cursor. where in i have used the concept of BULK FETCH.... each FETCH statement is taking lots of time to fetch specified number of rows at...
Explain what happens if you free a pointer twice?
What is the value of c?
What is the translation phases used in c language?
Write a program for Overriding.
Can you write the function prototype, definition and mention the other requirements.
How many levels of pointers can you have?
Can you write a programmer for FACTORIAL using recursion?
How can I make sure that my program is the only one accessing a file?
What is call by value in c?
What are the 4 types of unions?