ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C
 
 


 

 
 C interview questions  C Interview Questions
 C++ interview questions  C++ Interview Questions
 VC++ interview questions  VC++ Interview Questions
 Delphi interview questions  Delphi Interview Questions
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions
Question
write a program structure to find average of given number
 Question Submitted By :: Givefree
I also faced this Question!!     Rank Answer Posted By  
 
  Re: write a program structure to find average of given number
Answer
# 1
#include<stdio.h>
#include<math.h>
void main()
{
int num,a[100],sum=0;
float average;
printf("enter the number of elements");
scanf("%d",&num);
printf("enter the elements");
for(i=0;i<num;i++)
{
scanf("%d",&a[i]);
}
printf("the elements are");
for(i=0;i<num;i++)
{
printf("%d",a[i]);
}
for(i=0;i<num;i++)
{
sum=sum+a[i];
}
average=sum/num;
printf("%f",average);
}
 
Is This Answer Correct ?    2 Yes 1 No
Manjunath
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
How can I call a function, given its name as a string? ABC-Telecom2
what is the function of .h in #include<stdio.h> in c ? IBM9
What is meant by global static? why we have to use static variable instead of Global variable L&T2
how many times of error occur in C  7
difference between my-strcpy and strcpy ? Geometric-Software3
size maximum allocated by calloc() DELL1
YBJBU6  1
which one low Priority in c? a)=,b)++,c)==,d)+  8
HOW CAN ADD OUR FUNCTION IN LIBRARY.  5
Write code for atoi(x) where x is hexadecimal string. Adobe2
WRITE A PROGRAM TO FIND A REVERSE OF TWO NO  5
here is a link to download Let_Us_C_-_Yashwant_Kanetkar  2
how to estimate the disk access time? e.g. the time between read one byte and another byte in the disk. Google3
Write a program for deleting duplicate elements in an array Subex3
What is difference between the following 2 lines…. int temp = (int)(0x00); int temp = (0x00int); Bosch3
two variables are added answer is stored on not for third variable how it is possible?  3
can we access one file to one directory?  1
write a program to display the array elements in reverse order in c language  6
write a recursive program in'c'to find whether a given five digit number is a palindrome or not  1
hat is a pointer? Assurgent3
 
For more C Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com