0

I need answer

(Write C++ Statements) Write C++ statements to accomplish each of the following: a) Display the value of element 6 of character array f. b) Input a value into element 4 of one-dimensional floating-point array b. c) Initialize each of the 5 elements of one-dimensional integer array g to 8. d) Total and print the elements of floating-point array c of 100 elements

16th Dec 2017, 12:45 PM
Osama
1 Answer
+ 2
a) cout<<f[5]; b) cin>>b[3]; c) for(int& i:g) i = 8; d) float sum=0; for(float i:c){ cout<<i; sum+=i; } cout<<"Sum - "<<sum<<endl;
16th Dec 2017, 3:07 PM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar