can anyone please help me write a program to find the size of primitve datatypes in a particular complier and display the same on the screen.
thirtan
0
Newbie Poster
Recommended Answers
Jump to PostThe result of the sizeof operator will give you the size in bytes. The result type is size_t, but printf doesn't support printing size_t except in C99. You can get around that by casting the result to the largest unsigned integer type, unsigned long:
printf("Size of int …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.