Computer Science, asked by rithickravi, 1 month ago

void main() {
int c[={11,12,13,14,15);
intj. *q=c;
for(i=0;j<5;j++)
und
++;
printf("%d". "c);​

Answers

Answered by Anonymous
3

it's definitely going to throw error first the main function isn't written correctly and didn't even declared any variable correctly and the for loop is also wrong

Answered by shritik1605sl
0

Answer:

At the end the printf statement prints the value of integer c = 3,60,360.

Explanation:

int c[5]={11,12,13,14,15);

creates an Array of 5 elements containing the values 11,12,13,14,15.

c is an integer.

and the for loop first multiplies A[0]=11 with A[1]=12

and then stores in C.

Again the process is repeated and we get c = 11*12*13*14*15 as a result.

At the end the printf statement prints the value of integer c = 3,60,360.

Here, the code is a little bit incorrect and arranged in an improper order.

The exact code for print the product of arrays will be

void main()

{

int c[5]={11,12,13,14,15);

int c, p=0;

for(i=0;j<5;j++)

{

p= A[j]*A[j+1];

}

printf("%d". "c);​

}

#SPJ3

25 MAY 2022

Similar questions