Will Macros support multiple arguments ?
Answers were Sorted based on User's Feedback
Answer / agent
Yes we Macros support Multiple Arguments.
If we want to swap two value using macro how i can do if
you can do this then you know the ans.
or you can do one thing you chk greater no
By macro like
Max(30,10);
defination like :-
Max(x,y) x>y?x:y
here i m passing 2 arguments.
ok bye bye.
thx.
| Is This Answer Correct ? | 6 Yes | 2 No |
Answer / ronald
variadic macros --- C99 standard
#define MY_MACRO(...)
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / lokesh chauhan
Phani Kumar S. Please give me the detailed answer not only
in Yes or No thanks
Plz correct me if i m wrong...
Regards..
Lokesh Kumar Chauhan
lokesh_kumar_chauhan@yahoo.com
Noida
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / phani kumar satpathi
yes they will support multiple arguements
they are the short forms for activate some internal
functions
| Is This Answer Correct ? | 2 Yes | 1 No |
main(){char *str;scanf("%s",str);printf("%s",str); }The error in the above program is: a) Variable 'str' is not initialised b) Format control for a string is not %s c) Parameter to scanf is passed by value. It should be an address d) none
Write a c program using for loop in switch case?
write a program to find lcm and hcf of two numbers??
Write a Program to find whether the given number or string is palindrome.
write a reverse string to print a stars.(with out using logic) ***** **** *** ** *
Why do we need functions in c?
How can I direct output to the printer?
What is quick sort in c?
how to implement stack work as a queue?
void main() { int s[4][2]={ {1234,56},{1212,33},{1434,80},{1312,78} }; int (*p)[2]; int i,j,*pint; for(i=0;i<=3;i++) { p=&s[i]; pint=p; printf("\n"); for(j=0;j<=1;j++) printf("%d",*(pint+j)); } } while running this program it shows a warning-suspicious pointer conversion ie pint=p; my que is why should we assign the value of p to pint again.why cant we use it directly as *(p+j)..but if i use like tat the o/p is garbage value..
how to copy a string without using c function
What is a segmentation fault?