Time Left - 10:00 mins

Campus Recruitment Tech Quiz-9

Attempt now to get your rank among 274 students!

Question 1

void main( )

{   static int i = 6;

     if (– – i)

       {

          main( );

          printf(“%d”, i);

       }

}

Which is the output of above program?

Question 2

What is the output of the following code
void main()
{
int const *p=5;
printf("%d",++(*p));
}

Question 3

Which one of the following is the recurrence equation for the worst case time complexity of the Quicksort algorithm for sorting n (≥ 2) numbers? In the recurrence equations given in the optionsbelow, c is a constant.

Question 4

Banks often record transactions on an account in order of the times of the transactions, but many people like to receive their bank statements with checks listed in order by check number. People usually write checks in order by check number, and merchants usually cash them with reasonable dispatch. The problem of converting time-of-transaction ordering to check-number ordering is therefore the problem of sorting almost-sorted input. Which sorting algorithm is best in this case ?

Question 5

What will be the status of the input 14, 12, 90, 34, 23, 67, 35, 337, 87, 156, 389, 278, 92 after 3rd pass on applying  Straight two way Merge Sort.
  • 274 attempts
  • 3 upvotes
  • 3 comments
May 13GATE & PSU CS