CBSE (Science) Class 12CBSE
Share
Notifications

View all notifications

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

Login
Create free account


      Forgot password?

Question

Find and write the output of the. following C++ program code

Note : Assume au· required header files are already included in the program.

#define Diff(N1,N2) ((N1>N2)?Nl-N2:N2-N1)
void main()
{
    int A,B,NUM[] = {10,23,14,54,32};
    for(int CNT =4; CNT > 0; CNT--)
    {
        A=NUM[CNT];
        B=NUM[CNT-1];
        cout<<Diff(A,B)<< '#';
    }
}

Solution

22#40#9#13

  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 Au· Required Header Files Are Already Included in the Program. Concept: Advantages of Object Oriented Programming Over Earlier Programming Methodologies in C++.
S
View in app×