#define prod(a,b) a*b
main()
{
int x=3,y=4;
printf("%d",prod(x+2,y-1));
}
Answer / susie
Answer :
10
Explanation:
The macro expands and evaluates to as:
x+2*y-1 => x+(2*y)-1 => 10
| Is This Answer Correct ? | 50 Yes | 2 No |
main() { char a[4]="HELL"; printf("%s",a); }
char inputString[100] = {0}; To get string input from the keyboard which one of the following is better? 1) gets(inputString) 2) fgets(inputString, sizeof(inputString), fp)
how to concatenate the two strings
Write a C function to search a number in the given list of numbers. donot use printf and scanf
#define a 10 int main() { printf("%d..",a); foo(); printf("%d..",a); return 0; } void foo() { #undef a #define a 50 }
Link list in reverse order.
void main() { int k=ret(sizeof(float)); printf("\n here value is %d",++k); } int ret(int ret) { ret += 2.5; return(ret); }
How will u find whether a linked list has a loop or not?
main() { int i=5,j=6,z; printf("%d",i+++j); }
Is it possible to type a name in command line without ant quotes?
#define clrscr() 100 main() { clrscr(); printf("%d\n",clrscr()); }
main() { struct date; struct student { char name[30]; struct date dob; }stud; struct date { int day,month,year; }; scanf("%s%d%d%d", stud.rollno, &student.dob.day, &student.dob.month, &student.dob.year); }