write a program that explain #define and # undef directive
Answer Posted / ravi joshi
The following code snippet explain the use of #define and
#undef preprorcessor directives.
/* define our own value of NULL */
#ifdef NULL
#undef NULL /* if NULL is already defined, then
undefine it */
#define NULL ((void*)0) /* define our own version of NULL
#endif
| Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
The % symbol has a special use in a printf statement. How would you place this character as part of the output on the screen?
What is the purpose of the following code? Is there any problem with the code? void send(int count, short *to, short *from) { /* count > 0 assumed */ register n = (count + 7) / 8; switch (count % 8) { case 0: do { *to = *from++; case 7: *to = *from++; case 6: *to = *from++; case 5: *to = *from++; case 4: *to = *from++; case 3: *to = *from++; case 2: *to = *from++; case 1: *to = *from++; } while (--n > 0); } }
What is structure padding in c?
In this problem you are to write a program that will cut some number of prime numbers from the list of prime numbers between 1 and N.Your program will read in a number N; determine the list of prime numbers between 1 and N; and print the C*2 prime numbers from the center of the list if there are an even number of prime numbers or (C*2)-1 prime numbers from the center of the list if there are an odd number of prime numbers in the list.
Array is an lvalue or not?
Explain About fork()?
What is multidimensional arrays
What are the different types of linkage exist in c?
Explain what is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?
What are examples of structures?
What does double pointer mean in c?
Are there namespaces in c?
What is the general form of function in c?
What is a pointer in c plus plus?
Are pointers really faster than arrays?