#define SQR(x) x * x
main()
{
printf("%d", 225/SQR(15));
}
a. 1
b. 225
c. 15
d. none of the above
Answers were Sorted based on User's Feedback
Answer / anurag
the macro replacement will change printf to:
printf("%d", 225/15*15);
now, / and * have same priority so
225/15*15 = 15*15 = 225.
So answer is 225
| Is This Answer Correct ? | 24 Yes | 2 No |
main() { char *p = “ayqm”; printf(“%c”,++*(p++)); }
29 Answers IBM, TCS, UGC NET, Wipro,
write a origram swaoing valu without 3rd variable
what is variable length argument list?
how to return a multiple value from a function?
given integer number,write a program that displays the number as follows: First line :all digits second line : all except the first digit . . . . Last line : the last digit
void main() { char a[]="12345\0"; int i=strlen(a); printf("here in 3 %d\n",++i); }
void main() { int *i = 0x400; // i points to the address 400 *i = 0; // set the value of memory location pointed by i; }
Write a program that produces these three columns sequence nos. using loop statement Sequence nos. Squared Squared + 5 1 1 6 2 4 9 3 9 14 4 16 21 5 25 30
program to find magic aquare using array
1. const char *a; 2. char* const a; 3. char const *a; -Differentiate the above declarations.
/*what is the output for*/ void main() { int r; printf("Naveen"); r=printf(); getch(); }
write a c program to Create a mail account by taking the username, password, confirm password, secret_question, secret_answer and phone number. Allow users to register, login and reset password(based on secret question). Display the user accounts and their details .