CBSE (Science) Class 12CBSE
Share
Notifications

View all notifications

Find and Write the Output of the Following C++ Program Code : Note : Assume All Required Header Files Are Already Being Included in the Program. - CBSE (Science) Class 12 - Computer Science (C++)

Login
Create free account


      Forgot password?
ConceptPointers and Arrays - Array of Pointers, Pointer to an Array (1 Dimensional Array), Function Returning a Pointer, Reference Variables and Use of Alias

Question

Find and write the output of the following C++ program code :
Note : Assume all required header files are already being included in the program.

void main()
{
     int *Point, Score[]={100,95,150 , 75 , 65, 120};
     Point = Score;
     for(int L = 0; L<6; L++)
     {
         if((*Poi nt)%10==0)
            *Point /= 2;
         else
            *Point -= 2;
         if((*Point) %5==0)
            *Point /= 5;
         Point++;
      }
      for(int L = 5; L>=O; L--)
          cout<<Score[L]<<"*";
}

Solution

10*94*15*74*64*12

  Is there an error in this question or solution?

APPEARS IN

Solution Find and Write the Output of the Following C++ Program Code : Note : Assume All Required Header Files Are Already Being Included in the Program. Concept: Pointers and Arrays - Array of Pointers, Pointer to an Array (1 Dimensional Array), Function Returning a Pointer, Reference Variables and Use of Alias.
S
View in app×