Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


plz answer.... write a program that reads line (using
getline) e.g."345", converts each line to an integer
using "atoi" and computes the average of all the numbers
read. also compute the standard deviation.



plz answer.... write a program that reads line (using getline) e.g."345", converts each ..

Answer / dally

#include<stdio.h
int main()
{
char array[]= "345";
int n;
n = atoi(array);
while(n>1)
{
int sum,aveg,no=1;
n = n%10;
no++;
sum = sum+n;
n=n/10;
}
aveg= sum/no;
printf("Aveg of number %d\n",aveg);

Is This Answer Correct ?    4 Yes 0 No

Post New Answer

More C Interview Questions

void main() {int i=2; printf("%d%d%d",i,++i,i++); getch(); }

9 Answers  


When is a null pointer used?

0 Answers  


how to introdu5ce my self in serco

0 Answers  


What are enumerated types?

0 Answers  


matrix multiplication fails introspect the causes for its failure and write down the possible reasons for its failurein c language.

5 Answers   TCS,


Look at the Code: main() { int a[]={1,2,3},i; for(i=0;i<3;i++) { printf("%d",*a); a++; } } Which Statement is/are True w.r.t the above code? I.Executes Successfully & Prints the contents of the array II.Gives the Error:Lvalue Required III.The address of the array should not be changed IV.None of the Above. A)Only I B)Only II C)II & III D)IV

5 Answers   Accenture,


Why c is a procedural language?

0 Answers  


How will you allocate memory to a double pointer ?

2 Answers  


What is the purpose of macro in C language?

0 Answers   Fidelity,


while running a program, i got the msg that press return key to exit.what that mean in C as there are no such options as far i know.

1 Answers   TCS,


How will you declare an array of three function pointers where each function receives two ints and returns a float?

0 Answers   TISL,


How would you print out the data in a binary tree, level by level, starting at the top?

6 Answers   Amazon, Microsoft,


Categories