#if something == 0
int some=0;
#endif
main()
{
int thing = 0;
printf("%d %d\n", some ,thing);
}
Answer / susie
Answer :
0 0
Explanation
This code is to show that preprocessor expressions are not
the same as the ordinary expressions. If a name is not known
the preprocessor treats it to be equal to zero.
| Is This Answer Correct ? | 7 Yes | 2 No |
write a c program to print magic square of order n when n>3 and n is odd?
#if something == 0 int some=0; #endif main() { int thing = 0; printf("%d %d\n", some ,thing); }
#define assert(cond) if(!(cond)) \ (fprintf(stderr, "assertion failed: %s, file %s, line %d \n",#cond,\ __FILE__,__LINE__), abort()) void main() { int i = 10; if(i==0) assert(i < 100); else printf("This statement becomes else for if in assert macro"); }
Program to Delete an element from a doubly linked list.
4 Answers College School Exams Tests, Infosys,
Find your day from your DOB?
15 Answers Accenture, Microsoft,
how can i cast a char type array to an int type array
void main() { if(~0 == (unsigned int)-1) printf(“You can answer this if you know how values are represented in memory”); }
Write a program to print a square of size 5 by using the character S.
main() { char *a = "Hello "; char *b = "World"; clrscr(); printf("%s", strcat(a,b)); } a. Hello b. Hello World c. HelloWorld d. None of the above
#define f(g,g2) g##g2 main() { int var12=100; printf("%d",f(var,12)); }
main() { int c[ ]={2.8,3.4,4,6.7,5}; int j,*p=c,*q=c; for(j=0;j<5;j++) { printf(" %d ",*c); ++q; } for(j=0;j<5;j++){ printf(" %d ",*p); ++p; } }
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