I have one doubt.
What does below statement mean?
#define sizeof(operator)
where operator can be int or float etc.
Does this statement meaningful and where it can be used?



I have one doubt. What does below statement mean? #define sizeof(operator) where operator can be ..

Answer / senthil

The following define overrides all the occurrences of sizeof and replaces by blank, there is no definition of sizeof on the right hand side of expression

#define sizeof(operator)

example

printf("val = %d", sizeof(int)); is made to look like
printf("val = %d", ); // replaced by blank, int not processed
// causes compilation error

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

What is the acronym for ansi?

0 Answers  


What is a buffer in c?

0 Answers  


to write a program, that finds the minimum total number of shelves, including the initial one, required for this loading process. The packets are named A, B, C, D, E …….. Any numbers of packets with these names could be kept in the shelf, as in this example: [ZZLLAAJKRDFDDUUGGYFYYKK]. All packets are to be loaded on cars. The cars are lined in order, so that the packets could be loaded on them. The cars are also named [A, B, C, D, E,………….].

2 Answers   Infosys, TCS,


difference between string and array?

6 Answers  


2. Write a function called hms_to_secs() that takes three int values—for hours, minutes, and seconds—as arguments, and returns the equivalent time in seconds.. Create a program that exercises this function by repeatedly obtaining a time value in hours, minutes, and seconds from the user (format 12:59:59), calling the function, and displaying the value of seconds it returns.

5 Answers   TCS,






Explain function pointer with exapmles.

2 Answers  


Explain setjmp()?

0 Answers  


Given below are three different ways to print the character for ASCII code 88. Which is the correct way1) char c = 88; cout << c << " ";2) cout.put(88);3) cout << char(88) << " "; a) 1 b) 2 c) 3 d) constant

0 Answers  


What are void pointers in c?

0 Answers  


what is the code to display color fonts in the output?

1 Answers  


i have to apply for the rbi for the post of officers. i need to know abt the entrance questions whether it may be aps or techinical....

0 Answers   RBI,


What tq means in chat?

0 Answers  


Categories