Computer Science, asked by balathangam229, 3 months ago

what is the output of the program?
#include <iostream>​

Answers

Answered by daisydass100426
0

Answer:

#include <iostream>

   using namespace std;

   int arr[10] = {10, 11, 12, 13, 14, 15, 16, 17, 18, 19};

   void swap(int p, int q)

   {

       int temp = arr[p];

       arr[p] = arr[q];

       arr[q] = temp;

       return;

   }

   void printArr(int size)

   {

       int k;

       for (k = 0; k < size; k++)

           cout << arr[k] << " ";

       cout << endl;

       return;

   }

   void Permutation(int n, int size)

   {

       int k;

       if (n == 0)

           printArr(size);

       else

       {

           for (k = n - 1; k >= 0; k--)

           {

               swap(k, n - 1);

               Permutation(n - 1, size);

               swap(k, n - 1);

           }

       }

       return;

   }

   int main()

   {

       Permutation(3, 4);

       return 0;

   }

Explanation:

HOPE IT HAS HELPED U

Answered by riya2215
1

Answer:

Question - 1. #include <stdio.h> int main() { int x; x = 10; if(x > 10) x -= 10; else if(x >= 0) x += 00; else if(x) x += 10; else x -= 10; printf("%d\n",x); return 0; } ... Question - 4. #include <stdio.h> int main() { int a=10,b=20,*p,s=0; p = &a; a++; (*p)++; s = a + b + *p; printf("%d\n",s); return 0; } ... Question - 5.

Explanation:

hope it's helps you

Similar questions