For the following questions answer them individually
What is the output of this C++ program?
#include <iostream>
using namespace std;
void square (int *x)
{
*x = (*x)++ * (*x);
}
void square (int *x, int *y)
{
*x = (*x) * --(*y);
}
int main ( )
{
int number = 30;
square(&number, &number);
cout << number;
return 0;
}
The number of swappings needed to sort the numbers 8, 22, 7, 9, 31, 5, 13 in ascending order, using bubble sort is
Consider the following tree
If the post order traversal gives ab - cd * + then the label of the nodes 1,2,3,… will be