macro for sizeof

S

Sweety

hello,
how to use macro to calculate the sizeof some data types.
plz explain .
thanks in advance.
bye,
 
K

Keith Thompson

hello,
how to use macro to calculate the sizeof some data types.
plz explain .
thanks in advance.
bye,

You got several responses when you posted this same question two days
ago. If those responses weren't useful to you, you'll need to explain
why before we can help you.

It would also be helpful if you could tell us why you want to use a
macro rather than the builtin "sizeof" operator.
 
J

Joona I Palaste

You got several responses when you posted this same question two days
ago. If those responses weren't useful to you, you'll need to explain
why before we can help you.
It would also be helpful if you could tell us why you want to use a
macro rather than the builtin "sizeof" operator.

Because his teacher asked him to?
 
D

Dan Pop

In said:
Because his teacher asked him to?

It's a horrible homework assignment, except for a course in *advanced* C
programming. Otherwise, the only solution a teacher can realistically
expect is:

#define SIZEOF sizeof

Dan
 
D

Darrell Grainger

Because his teacher asked him to?

Or because he/she found a set of interview questions without the answers.
He/she is worried this might be a question they will ask during an
interview.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

sizeof implementation 8
sizeof implementation 2
Saving user's input for the next runs 0
C macro 3
condition true or false? -> (-1 < sizeof("test")) 83
Help with macro 2
Macro for pthread_create() 27
macro prototype 5

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top