‎#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

Link list in reverse order.

8 Answers   NetApp,


abcdedcba abc cba ab ba a a

2 Answers  


main() { char *p = “ayqm”; char c; c = ++*p++; printf(“%c”,c); }

1 Answers  


union u { struct st { int i : 4; int j : 4; int k : 4; int l; }st; int i; }u; main() { u.i = 100; printf("%d, %d, %d",u.i, u.st.i, u.st.l); } a. 4, 4, 0 b. 0, 0, 0 c. 100, 4, 0 d. 40, 4, 0

1 Answers   HCL,


program to find the roots of a quadratic equation

14 Answers   College School Exams Tests, Engineering, HP, IIIT, Infosys, Rajiv Gandhi University of Knowledge Technologies RGUKT, SSC,






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

9 Answers   HCL, Wipro,


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

14 Answers   HCL, Wipro,


int main() { int x=10; printf("x=%d, count of earlier print=%d", x,printf("x=%d, y=%d",x,--x)); getch(); } ================================================== returns error>> ld returned 1 exit status =================================================== Does it have something to do with printf() inside another printf().

1 Answers  


How will you print % character? a. printf(“\%”) b. printf(“\\%”) c. printf(“%%”) d. printf(“\%%”)

4 Answers   HCL,


can you use proc sql to manpulate a data set or would u prefer to use proc report ? if so why ? make up an example and explain in detail

0 Answers   TCS,


main(){ char a[100]; a[0]='a';a[1]]='b';a[2]='c';a[4]='d'; abc(a); } abc(char a[]){ a++; printf("%c",*a); a++; printf("%c",*a); }

2 Answers  


How to use power function under linux environment.eg : for(i=1;i<=n;i++){ pow(-1,i-1)} since it alerts undefined reference to 'pow'.

2 Answers  


Categories