write a program which counts a product of array elements
lower than 10.



write a program which counts a product of array elements lower than 10...

Answer / rajasekharreddy

#include<stdio.h>
#define SIZE 20
int main()
{
int arr[SIZE],arr_Size,i,mul=1;

printf("Printf array size\t");
scanf("%d",&arr_Size);

printf("\nenter numbers\t");
for(i=0;i<arr_Size;i++)
{
scanf("%d",&arr[i]);
}

printf("you entered numbers\t");
for(i=0;i<arr_Size;i++)
{
printf("%d\t",arr[i]);
}

for(i=0;i<arr_Size;i++)
{
if(arr[i]<10)
{
mul=mul*arr[i];
}
}

printf("\nout put is\t%d",mul);
return 0;
}

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More C Interview Questions

what does ‘#include’ mean?

1 Answers   TCS,


i have to apply for rbi before that i need to know the the syllabus for the entrance questions. whethet it may be aps or techinical

0 Answers  


Why cd or dvd are round why not square.

1 Answers  


What is difference between %d and %i in c?

0 Answers  


who will call your main function in c under linux?

2 Answers  






How do c compilers work?

0 Answers  


how much salary u want ? why u join in our company? your domain is core sector why u prefer software ?

0 Answers   Gopaljee, TCS,


Linked lists -- can you tell me how to check whether a linked list is circular?

0 Answers  


What is a program flowchart and how does it help in writing a program?

0 Answers  


du u know test pattern for robosoft? Plz share

1 Answers   RoboSoft, TATA, Wipro,


hello friends what do u mean by BUS ERROR i got this error while i am doing my program in DATA STRUCTURES

2 Answers   Wipro,


What are two dimensional arrays alternatively called as?

0 Answers  


Categories