Answer Posted / geetha gajendiran
a simple program using array
#include<stdio.h>
void main()
{
int avg,sum=0;
int i;
int pay[30];/*array declaration*/
for(i=0;i<=29;i++)
{
printf("\n enter payment:");
scanf("%d",&pay[i]);/*store data in array*/
}
for(i=0;i<=29;i++)
sum=sum+pay[i];/*read data from an array*/
avg=sum/30;
printf("\n average marks =%d",avg);
}
Is This Answer Correct ? | 20 Yes | 2 No |
Post New Answer View All Answers
find the sum of two matrices and WAP for it.
What is static identifier?
What is c programing language?
What are qualifiers and modifiers c?
How can I check whether a file exists? I want to warn the user if a requested input file is missing.
Does c have class?
What is a static variable in c?
what are the advantages of a macro over a function?
How many bytes are occupied by near, far and huge pointers (dos)?
Why does this code crash?
write a c program to calculate sum of digits till it reduces to a single digit using recursion
What will be your course of action for a push operation?
How can I handle floating-point exceptions gracefully?
Explain what is output redirection?
the process of defining something in terms of itself is called (or) in C it is possible for the functions to call themselves. A function called a) nested function b) void function c) recursive function d) indifinite function