3i Infotech Papers: Sample Questions 751 - 752 of 1245

Examrace Placement Series prepares you for the toughest placement exams to top companies.

Question number: 751

» Database » MySQL

Essay Question▾

Describe in Detail

What is the use of DESC in SQL?

Explanation

  • DESC is the explicit keyword used in ORDER BY to make the order descending.

  • DESC has two purposes.

    • Describes a schema.

    • Retrieves rows from table in descending order.

  • The query SELECT * FROM EMP ORDER BY ENAME DESC will display the output sorted on ENAME in descending order.

Syntax:

DESC table_name

  • DESC in the above brings out following information:

    • Column name

    • Weather the column allows NULL or not NULL.

    • Datatype of the column

    • Database size precision and on NUMERIC data- the datatype scale.

Question number: 752

» Languages » C & C Plus Plus

Essay Question▾

Describe in Detail

What is the output of the following program?

  1. void main ()
  2. {
  3.     printf (“sizeof(void *) = %d  ”, sizeof (void * ) );
  4.     printf (“sizeof(int *) = %d  ”, sizeof (int * ) );
  5.     printf (“sizeof(double *) = %d  ”, sizeof (double * ) );
  6.     printf (“sizeof(struct unknown *) = %d  ”, sizeof (struct unknown * ) );
  7. }

Explanation

Sizeof (void *) = 2sizeof (int *) = 2sizeof (double *) = 2sizeof (struct unknown *) = 2

  • In the program

Table shows the program

Table shows the program

printf (“sizeof (void *) =%d ”, sizeof (void *) );

  • The pointer to void type is size of 2

printf (“sizeof (int *) =%d ”, sizeof (int *) );

  • The pointer to integer type is size of 2

printf (“sizeof (double *) =%d ”, sizeof (double *) );

  • The pointer to double type is size of 2

printf (“sizeof (struct unknown *) =%d ”, sizeof (struct unknown *) );

  • The pointer to struct unknown type is size of 2

  • The pointer to any type is of same size.