write a program that explain #define and # undef directive
Answer / 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 |
what is the use of c program?
4 Answers Synergy, Web Synergies,
What is dynamic variable in c?
What is adt in c programming?
Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!)
write a programe returns the number of times the character appears in the string
How can I rethow can I return a sequence of random numbers which dont repeat at all?
6. Which of the Following is not defined in string.h? A)strspn() B)strerror() C)memchr() D)strod()
A function 'q' that accepts a pointer to a character as argument and returns a pointer to an array of integer can be declared as: A)int (*q(char*)) [] B)int *q(char*) [] C)int(*q)(char*) [] D)None of the Above
what is pointer?
What is sizeof in c?
program to find the second largest word in a paragraph amongst all words that repeat more thn twice
You have an int array with n elements and a structure with three int members. ie struct No { unsigned int no1; unsigned int no2; unsigned int no3; }; Point1.Lets say 1 byte in the array element is represented like this - 1st 3 bits from LSB is one number, next 2 bits are 2nd no and last 3 bits are 3rd no. Now write a function, struct No* ExtractNos(unsigned int *, int count) which extracts each byte from array and converts LSByte in the order mentioned in point1.and save it the structure no1, no2, no3. in the function struct No* ExtractNos(unsigned int *, int count), first parameter points to the base address of array and second parameter says the no of elements in the array. For example: if your array LSB is Hex F7 then result no1 = 7, no2 = 2, no3 = 7. In the same way convert all the elements from the array and save the result in array of structure.