• Call Us : 03082533000 (WhatsApp)
  • Email Us : TestPointpk.com@gmail.com
Sticky Note
What is the syntax for defining a method in Ruby?
روبی میں طریقہ کی وضاحت کے لیے نحو کیا ہے؟
  1. def method_name
  2. method method_name
  3. function method_name
  4. define method_name
Explanation

In Ruby, the syntax for defining a method is:

def method_name(parameters)

  # method body

end

The 'def' keyword is used to define a method, followed by the method name and parameters in parentheses.

The method body is indented and enclosed by the 'end' keyword.

Related MCQs

دوسری نسل کے کمپیوٹر میں مندرجہ ذیل میں سے کون سی ٹیکنالوجیز استعمال ہوئی؟
  1. Vacum Tubes
  2. Transistors
  3. Integrated circuits
  4. None of these
اس سوال کو وضاحت کے ساتھ پڑھیں

کمپیوٹر کا بانی کس کو کہا جاتا ہے؟
  1. Barbara Liskov
  2. Tim Berners-Lee
  3. Charles Babbage
  4. John von Neumann
اس سوال کو وضاحت کے ساتھ پڑھیں

کون سی سہولت دو یا دو سے زیادہ ٹاسک، جابز یا پروگرامز کو بیک وقت اجازت کی اجازت ہے؟
  1. Multi-computing
  2. Multi-processing
  3. Multi-tasking
  4. None of these
اس سوال کو وضاحت کے ساتھ پڑھیں

درج ذیل میں سے آپریٹنگ سسٹم کی مثال کون سی ہے؟
  1. Photoshop
  2. MS Windows
  3. MS Word
  4. None of these
اس سوال کو وضاحت کے ساتھ پڑھیں

آپریٹنگ سسٹم کے کرنل کا بنیادی کام کیا ہے؟
  1. Manage hardware and system resources
  2. Run user applications
  3. Provide internet connectivity
  4. None of these
اس سوال کو وضاحت کے ساتھ پڑھیں

All Rights Reserved © TestPointpk.com