Exams.RecruitmentIndia.in

A Learning Portal from Recruitment India

  • Home
  • Questions
    • Aptitude Questions
    • English Questions
    • Technical Questions
    • HR Interview Questions
    • Reasoning Questions
    • GK Questions
    • Current Affairs
    • Entrance Exams
  • IT Jobs By Location
    • Ahmedabad
    • Bangalore
    • Chandigarh
    • Chennai
    • Coimbatore
    • Delhi
    • Gurgaon
    • Hyderabad
    • Kolkata
    • Lucknow
    • Mumbai
    • Noida
    • Pune
    • Vizag
    • Vijaywada
  • Govt Jobs Portal
  • Online Tests Portal
  • Contact Us
New
Latest Private Jobs 2022 || Today Walkins || Latest Central Govt Jobs
New Recruitment India Job Notifications & Preparation Portal App || RecruitmentIndia Online Mock tests app
You are here: Home / Question and Answers

Assuming a short is two bytes long, what will be printed by the above code?

short testarray[4][3] = { {1}, {2,3}, {4,5,6}};
printf("%d", sizeof(testarray));

A. 

B. 

7

C. 

12

D. 

Answer
Workspace
Report
Discuss

Answer with explanation

Answer: Option D

Explanation

The following table provides the details of standard integer types with their storage sizes and value ranges −

Type Storage size Value range
char 1 byte -128 to 127 or 0 to 255
unsigned char 1 byte 0 to 255
signed char 1 byte -128 to 127
int 2 or 4 bytes -32,768 to 32,767 or -2,147,483,648 to 2,147,483,647
unsigned int 2 or 4 bytes 0 to 65,535 or 0 to 4,294,967,295
short 2 bytes -32,768 to 32,767
unsigned short 2 bytes 0 to 65,535
long 4 bytes -2,147,483,648 to 2,147,483,647
unsigned long 4 bytes 0 to 4,294,967,295

Workspace

Discuss about the question Cancel reply

Search

State Wise Govt Jobs

  • Andhra Pradesh Govt Jobs
  • Arunachal Pradesh Govt Jobs
  • Assam Govt Jobs
  • Bihar Govt Jobs
  • Chattishgarh Govt Jobs
  • Goa Govt Jobs
  • Gujarat Govt Jobs
  • Haryana Govt Jobs
  • Himachal Pradesh Govt Jobs
  • Jammu and Kashmir Govt Jobs
  • Jharkhand Govt Jobs
  • Karnataka Govt Jobs
  • Kerala Govt Jobs
  • Madhya Pradesh Govt Jobs
  • Maharashtra Govt Jobs
  • Tripura Govt Jobs
  • Uttar Pradesh Govt Jobs
  • Uttarakhand Govt Jobs
  • Manipur Govt Jobs
  • Meghalaya Govt Jobs
  • Mizoram Govt Jobs
  • Nagaland Govt Jobs
  • Odisha Govt Jobs
  • Punjab Govt Jobs
  • Rajasthan Govt Jobs
  • Sikkim Govt Jobs
  • Tamilnadu Govt Jobs
  • Telangana Govt Jobs
  • West Bengal Govt Jobs

Advertisement

Useful Links

  • About Us
  • Privacy Policy
  • Disclaimer Policy
  • Contact Us

Our Android Applications

  • Preparation & Job Updates App
  • Download Online Mock Tests App

Copyright © 2016 -2022 Exams Recruitment India || Product from Recruitment India Made with ❤ in India.