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 |
PLS U SENS ME INTERVIEW O. MY EMAIL ADD, SOFIYA.SINGH@GMAIL.COM
what is the output of the program and explain why?? #include<stdio.h> void main ( ) { int k=4,j=0: switch (k) { case 3; j=300; case 4: j=400: case 5: j=500; } printf (ā%d\nā,j); }
can we access one file to one directory?
What are comments and how do you insert it in a C program?
#include<stdio.h> int main(){ int a[]={1,2,3,5,1}; int *ptr=a+4; int y=ptr-a; printf("%d",y); }
What is the use of bitwise operator?
Given an array of numbers, except for one number all the others occur twice. Give an algorithm to find that number which occurs only once in the array.
What is the difference between realloc() and free()
Write a program to swap two numbers without using third variable?
What is a MAC Address?
how can i include my own .h file EX:- alex.h like #include<alex.h>, rather than #include"alex.h"
What is the difference between a free-standing and a hosted environment?