Join ExamsbookAnswer : 2. "10"
What would be the output of the following program ?
main()
{
const int x = 5;
int *ptrx;
ptrx = &x;
*ptr = 10;
printf ("%d", x);
}5
Q: What would be the output of the following program ? main() { const int x = 5; int *ptrx; ptrx = &x; *ptr = 10; printf ("%d", x); }
- 15false
- 210true
- 3Errorfalse
- 4Garbage valuefalse
- Show AnswerHide Answer
- Workspace
Answer : 2. "10"
Explanation :
Answer: B) 10 Explanation: