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 importance of c in your views?

0 Answers  


Explain what is the general form of a c program?

0 Answers  


How can I prevent another program from modifying part of a file that I am modifying?

0 Answers  


What is false about the following A compound statement is a.A set of simple statments b.Demarcated on either side by curly brackets c.Can be used in place of simple statement d.A C function is not a compound statement.

5 Answers   CCEM, TCS,


What is output of the following program ? main() { i = 1; printf("%d %d %d\n",i,i++,i++); }

9 Answers   CTS, Wipro,


main() { int i; printf("%d", &i)+1; scanf("%d", i)-1; }

1 Answers  


What do you mean by a local block?

0 Answers   InterGraph,


Determine the result of performing two successive block transfers into the same area of a frame buffer using the binary arith operations

0 Answers  


what are the 10 different models of writing an addition program in C language?

0 Answers  


how does the C compiler interpret the following two statements p=p+x; q=q+y; a.p=p+x; q=q+y b.p=p+xq=q+y c.p=p+xq; q=q+y d.p=p+x/q=q+y

4 Answers   TCS,


Look at the Code: #include<string.h> void main() { char s1[]="abcd"; char s2[10]; char s3[]="efgh"; int i; clrscr(); i=strcmp(strcat(s3,ctrcpy(s2,s1))strcat(s3,"abcd")); printf("%d",i); } What will be the output? A)No output B) A Non Integer C)0 D) Garbage

7 Answers   Accenture,


What is extern keyword in c?

0 Answers  


Categories