Aptitude [Sasken Placement]: Sample Questions 22 - 24 of 35

Get unlimited access to the best preparation resource for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 22

Aptitude
Edit

Write in Short

Short Answer▾

A number is as much greater than 56 as is less than 94. Find the number.

Explanation

Let the number be x. From the given information we can write,

The required number is 19.

Question 23

Aptitude
Edit

Write in Short

Short Answer▾

The average of four consecutive even numbers is 54. Find the largest of these numbers.

Explanation

Let the numbers be x, x + 2, x + 4, x + 6. Then,

= 54

So, largest number =

Question 24

Aptitude
Edit

Write in Short

Short Answer▾

What is the output of the Program?

  1. main ()
  2. {
  3.     inta[10] ={ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
  4.     int ⚹p =a;
  5.     int ⚹q =& a[9];
  6.     printf ( “%d” q -p +1);
  7. }

Explanation

  • Here, a is an array of 10 integers, where, a [0] = 1, a [1] = 2, a [2] = 3, a [3] = 4, a [4] = 5, a [5] = 6, a [6] = 7, a [7] = 8, a [8] = 9, a [9] = 10
  • p and q are the integer pointers. In the print f () function we want to print the difference between q and p on the next line which will also be an integer. Here, q - p is evaluated as size of (q - p) . q is initialized with a + 0 and p is initialized with a + 9. So, difference between both the integer pointers is 9. So, q - p + 1 = 9 + 1 = 10 will get printed on the screen.
  • Output is 10

Developed by: