main()

{

int c = 5;

printf("%d", main||c);

}

a. 1

b. 5

c. 0

d. none of the above

Answers were Sorted based on User's Feedback



main() { int c = 5; printf("%d", main||c); } a. 1 b. 5 c. 0 d...

Answer / guest

a) 1, if we use main|c then error, illegal use of pointer

Is This Answer Correct ?    13 Yes 3 No

main() { int c = 5; printf("%d", main||c); } a. 1 b. 5 c. 0 d...

Answer / saurabh

a. 1, bcz anything||any +ve value(except zero) is true(1).

Is This Answer Correct ?    3 Yes 1 No

Post New Answer

More C Code Interview Questions

main() { int (*functable[2])(char *format, ...) ={printf, scanf}; int i = 100; (*functable[0])("%d", i); (*functable[1])("%d", i); (*functable[1])("%d", i); (*functable[0])("%d", &i); } a. 100, Runtime error. b. 100, Random number, Random number, Random number. c. Compile error d. 100, Random number

1 Answers   HCL, rsystems,


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

1 Answers  


Write a prog to accept a given string in any order and flash error if any of the character is different. For example : If abc is the input then abc, bca, cba, cab bac are acceptable, but aac or bcd are unacceptable.

5 Answers   Amazon, Microsoft,


Program to Delete an element from a doubly linked list.

4 Answers   College School Exams Tests, Infosys,


Hi, i have a project that the teacher want a pyramid of numbers in C# or java...when we click a button...the pyramid should be generated in a listbox/or JtextArea...and the pyramid should have the folowing form: 1 232 34543 4567654 567898765 67890109876 7890123210987 890123454321098 90123456765432109 0123456789876543210 Plz help with codes...didn't find anything on the net.

0 Answers  






void main() { char a[]="12345\0"; int i=strlen(a); printf("here in 3 %d\n",++i); }

3 Answers  


Is it possible to print a name without using commas, double quotes,semi-colons?

7 Answers  


void main() { int i=5; printf("%d",i+++++i); }

3 Answers  


main() { char *cptr,c; void *vptr,v; c=10; v=0; cptr=&c; vptr=&v; printf("%c%v",c,v); }

1 Answers  


main() { float me = 1.1; double you = 1.1; if(me==you) printf("I love U"); else printf("I hate U"); }

1 Answers  


There is a lucky draw held every day. if there is a winning number eg 1876,then all possible numbers like 1867,1687,1768 etc are the numbers that match irrespective of the position of the digit. Thus all these numbers qualify fr the lucky draw prize Assume there is no zero digit in any numbers. write a program to show all the possible winning numbers if a "winning number"is passed as an arguments to the function.

1 Answers   Nagarro,


void main() { int x,y=2,z; z=(z*=2)+(x=y=z); printf("%d",z); }

4 Answers  


Categories