#ifdef something

int some=0;

#endif

main()

{

int thing = 0;

printf("%d %d\n", some ,thing);

}



#ifdef something int some=0; #endif main() { int thing ..

Answer / susie

Answer :

Compiler error : undefined symbol some

Explanation:

This is a very simple example for conditional compilation.
The name something is not already known to the compiler
making the declaration

int some = 0;

effectively removed from the source code.

Is This Answer Correct ?    2 Yes 2 No

Post New Answer

More C Code Interview Questions

write a c program to Reverse a given string using string function and also without string function

1 Answers  


main() { char a[4]="HELL"; printf("%s",a); }

3 Answers   Wipro,


main() { int i=5,j=10; i=i&=j&&10; printf("%d %d",i,j); }

1 Answers  


#include <stdio.h> int main(void) { int a=4, b=2; a=b<<a+b>>2 ; printf("%d",a); return 0; }

0 Answers   Student,


#define int char main() { int i=65; printf("sizeof(i)=%d",sizeof(i)); }

1 Answers  






how to delete an element in an array

2 Answers   IBM,


main() { int i=-1,j=-1,k=0,l=2,m; m=i++&&j++&&k++||l++; printf("%d %d %d %d %d",i,j,k,l,m); }

1 Answers  


How we print the table of 2 using for loop in c programing?

14 Answers   HCL, Wipro,


Write a C program that defines a 2-dimentional integer array called A [50][50]. Then the elements of this array should randomly be initialized either to 1 or 0. The program should then print out all the elements in the diagonal (i.e. a[0][0], a[1][1],a[2][2], a[3][3], ……..a[49][49]). Finally, print out how many zeros and ones in the diagonal.

2 Answers  


main() { int i; clrscr(); printf("%d", &i)+1; scanf("%d", i)-1; } a. Runtime error. b. Runtime error. Access violation. c. Compile error. Illegal syntax d. None of the above

1 Answers   HCL,


write a c program to input initial & final time in the format hh:mm and find the time intervel between them? Ex inputs are initial 06:30 final 00:05 and 23:22 final 22.30

0 Answers  


main() { unsigned char i=0; for(;i>=0;i++) ; printf("%d\n",i); }

1 Answers  


Categories