U
Q. What is the output of this program?
#include #include using namespace std; float avg( int Count, ... ) { va_list num; va_start(num, Count); int Sum = 0; for (int i = 0; i < Count; ++i ) Sum += va_arg(num, int); va_end(num); return (Sum/Count); } int main() { float AVG = avg(5, 0, 1, 2, 3, 4); cout << "Average of first 5 whole numbers : " << AVG; return 0; }
No solution found for this question.
Add Solution and get +2 points.
You must be Logged in to update hint/solution
Be the first to start discuss.
Q. Which of the following is a correctly defined structure?
Q. Which of the following can be used to define a function in C++?
Q. Which is used to keep the call by reference value as intact?
Q. Which looping process checks the test condition at the end of the loop?
Q. The function used to disply one character at a time
Q. What is the output of the following code snippet? int x = 10; int &ref = x; ref = 20; cout << x;
Q. What is the number of parameters that a default constructor requires?
Discusssion
Login to discuss.