HCL Placement: Sample Questions 8 - 10 of 57

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 8

Question

MCQ▾

The cost price of 36 books is equal to the selling price of 30 books. What will be the gain?

Choices

Choice (4)

a.

20 %

b.

82 %

c.

18 %

d.

16 %

Answer

a.

Explanation

  • Cost price of 36 books is equal to selling price of 30 books.
  • So, cost price (CP) of books will be ₹ 30.
  • Selling price (SP) of books will be ₹ 36.
  • Gain, =

=

= 6 ₹

  • Gain (%) =

=

= 20 %

  • Gain will be 20 % .

Question 9

Question

MCQ▾

A taxi fares were ₹ 1.00 for the first mile and ₹ 0.20 for each miles thereafter. The taxi fare for a 3-mile ride was________

Choices

Choice (4)

a.

₹ 4.20

b.

₹ 3.00

c.

₹ 2.40

d.

₹ 3.80

Answer

d.

Explanation

  • Taxi fares ₹ 1 for first mile and 0.20 for each miles there affter.
  • Taxi covers total 3 miles distance.
  • Subtracting mile distance, remaining distance will be miles.
  • For miles taxi fares ₹ 0.20
  • Then for miles how much taxi will fare total (?)

  • Total fare for 3 miles = Fare for first mile + fare for rest miles

  • Taxi fare for 3 miles ride will be ₹ 3.80.

Question 10

Question

MCQ▾

What is the output of the following program?

  1. intx=0x65;
  2. main()
  3. {
  4.     charx;
  5.     printf("%dn",x)
  6. }

Choices

Choice (4)

a.

Unidentified

b.

‘A’

c.

Compilation error

d.

65

Answer

d.

Explanation

  • Here, integer x is defined with hex value 65, which is the ascii value of letter A.
  • In the main function one character variable x is declared
  • In the printf function we want to print the value of x which is a character.
  • The format specifier is % d, which is for integer value.
  • So, output will be 65.

Developed by: