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 |
void main() {int i=2; printf("%d%d%d",i,++i,i++); getch(); }
When is a null pointer used?
how to introdu5ce my self in serco
What are enumerated types?
matrix multiplication fails introspect the causes for its failure and write down the possible reasons for its failurein c language.
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
Why c is a procedural language?
How will you allocate memory to a double pointer ?
What is the purpose of macro in C language?
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.
How will you declare an array of three function pointers where each function receives two ints and returns a float?
How would you print out the data in a binary tree, level by level, starting at the top?