Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

6. What does the following function return? int index_of_smallest(const double a

ID: 3572728 • Letter: 6

Question

6. What does the following function return?

                int index_of_smallest(const double a[], int startIndex, int numberOfSlots);

A. a double         B. the address of an integer        C. an integer      D. nothing

7. Which statement correctly opens an input stream named in_file and attaches it to a file name project.txt?

                A. in_file=project.txt

                B. in_file="project.txt"

                C. in_file.open("project.txt");

                D. in_file.open(project.txt);

Explanation / Answer

What does the following function return?

                int index_of_smallest(const double a[], int startIndex, int numberOfSlots);
              
              
   it passing three parameters of type double , integer and integer through index_of_smallest function and it returns integer value          
              
              
Which statement correctly opens an input stream named in_file and attaches it to a file name project.txt?

                A. in_file=project.txt

                B. in_file="project.txt"

                C. in_file.open("project.txt");

                D. in_file.open(project.txt)
              
   Answer is C
  
                C. in_file.open("project.txt");
              
   option A, B and D will gives syntax option