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 |
Should I use symbolic names like true and false for boolean constants, or plain 1 and 0?
Write a C program on Centralized OLTP, Decentralized OLTP using locking mechanism, Semaphore using locking mechanism, Shared memory, message queues, channel of communication, sockets and a simple program on Saving bank application program using OLTP in IPC?
print out of string in this format; 1. "rajesh" 2. \n 3. %d
Write a program to reverse a given number in c language?
to find out the reverse digit of a given number
6 Answers Infosys, Microsoft, TCS, Wipro,
write a c program to find the largest and 2nd largest numbers from the given n numbers without using arrays
What does == mean in texting?
regarding the scope of the varibles;identify the incorrect statement: a.automatic variables are automatically initialised to 0 b.static variables are are automatically initialised to 0 c.the address of a register variable is not accessiable d.static variables cannot be initialised with any expression
What is the use of the function in c?
What do you mean by Recursion Function?
What is the difference between null pointer and the void pointer?
How can you convert integers to binary or hexadecimal?