• Call Us : 03082533000 (WhatsApp)
  • Email Us : TestPointpk.com@gmail.com
Sticky Note
Suppose z is an integer while z and y are long variables. If you write z = z + y; in your C program, which of the following will happen?
  1. Compiler will generate error
  2. z will be converted to long and z will be calculated as long
  3. y will be converted to int and z will be calculated as int
  4. z will be converted to long and z will be calculated as int
Explanation

In z = z + y;, since z is an int and y is long, y is converted to int (if possible) to match the type of z due to usual type conversion rules.

The result is calculated as an int, and this may cause data loss if y exceeds int range.

Related MCQs

ورچوئل میموری میں میموری کے وسائل کن کے درمیان منظم اور مختص کیے جاتے ہیں؟
  1. Printers
  2. Processes
  3. Keyboards
  4. None of these
اس سوال کو وضاحت کے ساتھ پڑھیں

وی پی این کا بنیادی مقصد کیا ہے؟
  1. To provide privacy and secure connections over networks
  2. To delete computer files
  3. To increase RAM
  4. None of these
اس سوال کو وضاحت کے ساتھ پڑھیں

ای میل ایڈریس کا ڈومین والا حصہ عام طور پر کس چیز کی نشاندہی کرتا ہے؟
  1. The email password
  2. The organization or mail service domain
  3. The user's phone number
  4. None of these
اس سوال کو وضاحت کے ساتھ پڑھیں

سرچ انجن کا بنیادی مقصد کیا ہے؟
  1. To create documents
  2. To search for information and websites
  3. To design presentations
  4. None of these
اس سوال کو وضاحت کے ساتھ پڑھیں

نیٹ ورک کارڈ کے منفرد ہارڈویئر ایڈریس کو کیا کہتے ہیں؟
  1. IP Address
  2. MAC Address
  3. Email Address
  4. None of these
اس سوال کو وضاحت کے ساتھ پڑھیں

All Rights Reserved © TestPointpk.com