‎#define good bad
main()
{
int good=1;
int bad=0;
printf ("good is:%d",good);
}

Answers were Sorted based on User's Feedback



‎#define good bad main() { int good=1; int bad=0; printf ("good is:%d",good..

Answer / suresh kumar beniwal

multiple declaration of bad
so error occur
write program is

#define good bad
main()
{
int good=1;
bad=0;
printf ("good is:%d",good);
}

output :
good is : 0

Is This Answer Correct ?    3 Yes 0 No

‎#define good bad main() { int good=1; int bad=0; printf ("good is:%d",good..

Answer / elango

ans:0

Explain:
#define good bad
is denoted by good = bad,
printf("good is:%d",good);

ans"0

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More C Code Interview Questions

what will be the position of the file marker? a: fseek(ptr,0,SEEK_SET); b: fseek(ptr,0,SEEK_CUR);

2 Answers  


Finding a number multiplication of 8 with out using arithmetic operator

8 Answers   Eyeball, NetApp,


source code for delete data in array for c

1 Answers   TCS,


Code for 1>"ascii to string" 2>"string to ascii"

1 Answers   Aricent, Global Logic,


Given n nodes. Find the number of different structural binary trees that can be formed using the nodes.

16 Answers   Aricent, Cisco, Directi, Qualcomm,






Is the following code legal? typedef struct a aType; struct a { int x; aType *b; };

1 Answers  


{ int *ptr=(int*)malloc(sizeof(int)); *ptr=4; printf("%d",(*ptr)+++*ptr++); }

4 Answers  


hello sir,is there any function in C that can calculate number of digits in an int type variable,suppose:int a=123; 3 digits in a.what ll b answer?

6 Answers  


int swap(int *a,int *b) { *a=*a+*b;*b=*a-*b;*a=*a-*b; } main() { int x=10,y=20; swap(&x,&y); printf("x= %d y = %d\n",x,y); }

1 Answers  


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

3 Answers   Wipro,


How can you relate the function with the structure? Explain with an appropriate example.

0 Answers  


union u { union u { int i; int j; }a[10]; int b[10]; }u; main() { printf("\n%d", sizeof(u)); printf(" %d", sizeof(u.a)); // printf("%d", sizeof(u.a[4].i)); } a. 4, 4, 4 b. 40, 4, 4 c. 1, 100, 1 d. 40 400 4

3 Answers   HCL,


Categories