Is it better to use a macro or a function?
Answer / Neha Kumari
In general, functions are preferred over macros because they offer better error checking and clarity. Macros can lead to unintended side effects and make code harder to understand and debug.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the best way of making my program efficient?
how to compare two strings without using strcmp() function??
9.how do you write a function that takes a variable number of arguments? What is the prototype of printf () function? 10.How do you access command-line arguments? 11.what does ‘#include<stdio.h>’ mean? 12.what is the difference between #include<> and #include”…”? 13.what are # pragma staments? 14.what is the most appropriate way to write a multi-statement macro?
#define MAX(x,y) (x) >(y)?(x):(y) main() { inti=10,j=5,k=0; k= MAX(i++,++j); printf("%d..%d..%d",i,j,k); }
What are terms in math?
praagnovation
5 Write an Algorithm to find the maximum and minimum items in a set of ‘n’ element.
In the following code segment what will be the result of the function, value of x , value of y { unsigned int x=-1; int y; y = ~0; if(x == y) printf("same"); else printf("not same"); } a) same, MAXINT, -1 b) not same, MAXINT, -MAXINT c) same , MAXUNIT, -1 d) same, MAXUNIT, MAXUNIT e) not same, MAXINT, MAXUNIT
What is array of structure in c programming?
what is a void pointer?
can we define a function in structure?
what is the difference between <stdio.h> and "stdio.h"
14 Answers Invendis, Kanbay, Mastek, MathWorks,