+2

Can anyone explain these questions??

https://photos.app.goo.gl/nUEFeyFtmMt8ghCe7

c++

4/1/2020 11:20:17 AM

Rashmi Mittal

3 Answers

New Answer

+6

This is the link https://photos.app.goo.gl/nUEFeyFtmMt8ghCe7 Next time make sure to share it in the description and not in title. 1) https://docs.microsoft.com/en-us/cpp/cpp/int8-int16-int32-int64 2) const 'x' is a global variable which has a scope throughout the whole program whereas array variable 'x' has a scope limited to main() so it can be used again. int x[x] = int x[5] So sizeof(x) = 5*4 = 20 because one integer variable occupies 4 bytes of memory. So 20/4 = 5.

+5

Rashmi Mittal sizeof returns the amount of Bytes the element is using. So the idea is to find the sizeof(array) (in your case which will be 20)  So sizeof(array)/4 will be 5 And I have no idea about 1st question 😔