1,235 views
0 0 votes
int *p, A[3]={0,1,2};

p=A;

*(P+2)=5;

p=A++;

*P=7;

what are the values stored in the atray A from index 0 to index 2 after execution of the above cod?

1 Answer

Position:
Show:

Related questions

7 7 votes
2 2 answers
317
317 views
GO Classes asked Jun 29
317 views
What is the output of the following code?#include <stdio.h struct Item { int code; int price; }; void update(struct Item *p) { p->price = p->price + 20; (*p).code = (*p)....
6 6 votes
2 2 answers
287
287 views
GO Classes asked Jun 29
287 views
What is the output of the following code?#include <stdio.h struct Box { int width; int height; }; int main() { struct Box b = {4, 6}; struct Box *p = &b; p->width = p->wi...
4 4 votes
2 2 answers
295
295 views
GO Classes asked Jun 27
295 views
What will happen in the following code?#include <stdio.h #include <stdlib.h int main() { int *p = (int *)malloc(sizeof(int)); *p = 10; free(p); printf("%d", *p); return 0...
6 6 votes
2 2 answers
260
260 views
GO Classes asked Jun 27
260 views
What is the output of the following code?#include <stdio.h int main() { int x = 25; void *p = &x; printf("%d", *(int *)p); return 0; }$\texttt{25}$ Address of $\texttt{x}...