Languages-Objective C (Mobile) [HCL Placement]: Sample Questions 1 - 1 of 1

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

Question 1

Objective C (Mobile)
Edit

Write in Short

Short Answerβ–Ύ

What is the size of integer?

Explanation

  • Different C compilers work on different operating systems and different microprocessor.
  • Like, 16 bit Turbo C compiler is based on 8086 processor, which is having 16 bit data bus. So, size of int is 2 bytes.
  • 32 bit ANSI C compiler is based on 80386 dx processor, which is having 32 bit dat bus. So, size of int is 4 bytes.
  • So, we can say as compiler changes the size of int also changes.
  • Any C standard only requires the following:
  • size of (char) <= size of (short) <= size of (int) <= size of (long) <= size of (long long)
  • Same way, size of (float) <= size of (double) <= size of (long double)

Developed by: