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 will the code below print when it is executed? int x = 3, y = 4; if (x = 4) y = 5; else y = 2; printf ("x=%d, y=%d ",x,y);
Differentiate between Macro and ordinary definition.
Write a progarm to find the length of string using switch case?
Explain how can you avoid including a header more than once?
which type of aspect you want from the student.
hi to every one .. how to view table pool after creating the pooled table? plz help me.. if any knows abt this ..
Explain logical errors? Compare with syntax errors.
What is the use of a static variable in c?
What is an operator?
What are the disadvantages of a shell structure?
Explain the Difference between the New and Malloc keyword.
What type is sizeof?
Is c is a low level language?
What is difference between static and global variable in c?
Is register a keyword in c?