Calculate the weighted average of a list of n numbers using
the formula
xavg = f1x1+f2x2+ ….+ fnxn
where the f’s are fractional weighting factors, i.e.,
0<=fi<1, and f1+f2+….+fn = 1


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More C Interview Questions

What is the right type to use for boolean values in c? Is there a standard type?

0 Answers  


Write a c program using for loop in switch case?

1 Answers   Infosys,


What are the types of variables in c?

0 Answers  


What does node * mean?

0 Answers  


When should we use pointers in a c program?

0 Answers  






Draw a flowchart to produce a printed list of all the students over the age of 20 in a class .The input records contains the name and age of students. Assume a sentinel value of 99 for the age field of the trailer record

0 Answers   Wipro,


What is a Genralised LInked List?? Please give a detailed explation of it..

1 Answers  


What are types of preprocessor in c?

0 Answers  


what is the output of the program?? #include<stdio.h> main ( ) { int a=010,sum=0,tracker: for(tracker=0;tracker<=a;tracker++) sum+=tracker; printf(“ %d\n”,sum); } what is the difference between a=10 and a=010??

3 Answers   Oracle,


What is the difference between GETS();AND SCANF();

4 Answers   TCS,


List the difference between a While & Do While loops?

0 Answers   Accenture,


Write an implementation of “float stringToFloat(char *str).” The code should be simple, and not require more than the basic operators (if, for, math operators, etc.). • Assumptions • Don’t worry about overflow or underflow • Stop at the 1st invalid character and return the number you have converted till then, if the 1st character is invalid return 0 • Don’t worry about exponential (e.g. 1e10), instead you should treat ‘e’ as an invalid character • Write it like real code, e.g. do error checking • Go though the string only once • Examples • “1.23” should return 1.23 • “1a” should return 1 • “a”should return 0

6 Answers   Qualcomm,


Categories