void main() {
int c[={11,12,13,14,15};
int j,*q=c;
for(j=0;j<5;j++){
++;
}
printf("%d ",*c);
}
Answers
Answered by
9
Answer:
11 11 11 11 11
Explanation:
The loop prints only first character in array
Answered by
0
Answer:
The output of the given code is 11.
Explanation:
- An array of 5 elements 11, 12, 13, 14, and 15 is declared and initialized.
- A variable j and a pointer variable q is declared in the next line.
- The pointer variable points to the address of the array.
- A for loop with the initial condition as j=0 is executed. It increments the value of q.
- The for loop is repeated 5 times until the value of j becomes 5.
- Once the for loop is terminated, the first array element is printed.
- Since no operation is being performed on any of the array elements, the values remain unchanged and only the first value is printed.
Therefore, for the given code, the output is 11.
#SPJ3
Similar questions
Math,
15 days ago
Math,
15 days ago
Social Sciences,
1 month ago
Computer Science,
1 month ago
Math,
8 months ago
Physics,
8 months ago