Can’t find an answer?

Can’t find an answer?

Ask us to get the answer

  • This forum is empty.

Why is gets not preferred instead of gets.chomp?

(a) Gets add an extra new line while chomp removes it

(b) Gets remove an extra new line

(c) Chomp erases the value stored in the variable

(d) All of the mentioned

I had been asked this question during an internship interview.

The query is from Library Functions in portion Ruby Basics of Ruby

  • RUBY
  • August 20, 2023 at 5:06 am

Which sequence can be used to substitute the value of any ruby expression in a string?

(a) #(expr)

(b) #{expr}

(c) #expr

(d) None of the mentioned

This question was addressed to me in homework.

This intriguing question originated from Library Functions topic in portion Ruby Basics of Ruby

  • RUBY
  • September 15, 2023 at 5:06 am

For getting an input from the user which method is used?

(a) get

(b) gets.chomp

(c) get-s

(d) chomp

The question was asked during an interview.

This is a very interesting question from Library Functions topic in chapter Ruby Basics of Ruby

  • RUBY
  • September 4, 2023 at 5:06 am

We use semicolon or parentheses after every print or puts statement.

(a) True

(b) False

This question was addressed to me in homework.

Question is taken from Library Functions in section Ruby Basics of Ruby

  • RUBY
  • November 4, 2023 at 5:06 am

Why is the library function ‘puts’used for?

(a) Prints whatever is given and print it to the screen

(b) Prints whatever is given and insert a new(blank) line

(c) Gets input from the user

(d) None of the mentioned

The question was asked during an online interview.

My question is from Library Functions topic in portion Ruby Basics of Ruby

  • RUBY
  • August 23, 2023 at 5:06 am

Which of the following is not a valid library function?

(a) Puts

(b) Print

(c) Gets

(d) Get

I had been asked this question during an internship interview.

This is a very interesting question from Library Functions in chapter Ruby Basics of Ruby

  • RUBY
  • October 30, 2023 at 5:06 am

What is the range of octal notation (\nnn)?

(a) 0-8

(b) 0-7

(c) 0-A

(d) None of the mentioned

I got this question in class test.

My enquiry is from Data Types and Variables topic in division Ruby Basics of Ruby

  • RUBY
  • August 18, 2023 at 5:06 am

Which of the following is not a valid datatype?

(a) Float

(b) Integer

(c) Binary

(d) Timedate

I got this question in an interview for job.

The origin of the question is Data Types and Variables in chapter Ruby Basics of Ruby

  • RUBY
  • August 24, 2023 at 5:06 am

What is the sequence of ruby strings?

(a) 16-bit bytes

(b) 8-bit bytes

(c) 10-bit bytes

(d) None of the mentioned

I had been asked this question in an online quiz.

My question is based upon Data Types and Variables topic in portion Ruby Basics of Ruby

  • RUBY
  • August 28, 2023 at 5:06 am

What does the notataion \b stands for?

(a) Escape

(b) Space

(c) Backspace

(d) Newline

This question was addressed to me in exam.

The above asked question is from Data Types and Variables topic in division Ruby Basics of Ruby

  • RUBY
  • October 31, 2023 at 5:06 am

Viewing 15 topics - 31 through 45 (of 73 total)

1 2 3 4 5
  • You must be logged in to create new topics.