• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

C Quiz - 101 | Question 1

Suppose that in a C program snippet, followings statements are used. C
i) sizeof(int);
ii) sizeof(int*);
iii) sizeof(int**);
Assuming size of pointer is 4 bytes and size of int is also 4 bytes, pick the most correct answer from the given options.

(A)

Only i) would compile successfully and it would return size as 4.

(B)

i), ii) and iii) would compile successfully and size of each would be same i.e. 4

(C)

i), ii) and iii) would compile successfully but the size of each would be different and would be decided at run time.

(D)

ii) and iii) would result in compile error but i) would compile and result in size as 4.

Answer

Please comment below if you find anything wrong in the above post
Feeling lost in the world of random DSA topics, wasting time without progress? It's time for a change! Join our DSA course, where we'll guide you on an exciting journey to master DSA efficiently and on schedule.
Ready to dive in? Explore our Free Demo Content and join our DSA course, trusted by over 100,000 geeks!

Last Updated :
Share your thoughts in the comments