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.
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 |
how can I convert a string to a number?
#include<stdio.h> main() { int a[3]; int *I; a[0]=100;a[1]=200;a[2]=300; I=a; Printf(“%d\n”, ++*I); Printf(“%d\n”, *++I); Printf(“%d\n”, (*I)--); Printf(“%d\n”, *I); } what is the o/p a. 101,200,200,199 b. 200,201,201,100 c. 101,200,199,199 d. 200,300
Why main is not a keyword in c?
Given a piece of code int x[10]; int *ab; ab=x; To access the 6th element of the array which of the following is incorrect? (A) *(x+5) (B) x[5] (C) ab[5] (D) *(*ab+5} .
What could possibly be the problem if a valid function name such as tolower() is being reported by the C compiler as undefined?
List some of the static data structures in C?
What is scope of variable in c?
Lists the benefits of c programming language?
What is the sizeof () operator?
Go through the following code sinippet char a[20]; a="Hello Orcale Test"; will this compile?
what is the use of using linked list and array?
What is stack in c?