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
Answer / guest
a) 1, if we use main|c then error, illegal use of pointer
Is This Answer Correct ? | 13 Yes | 3 No |
Answer / saurabh
a. 1, bcz anything||any +ve value(except zero) is true(1).
Is This Answer Correct ? | 3 Yes | 1 No |
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
main() { unsigned char i=0; for(;i>=0;i++) ; printf("%d\n",i); }
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.
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.
void main() { char a[]="12345\0"; int i=strlen(a); printf("here in 3 %d\n",++i); }
Is it possible to print a name without using commas, double quotes,semi-colons?
void main() { int i=5; printf("%d",i+++++i); }
main() { char *cptr,c; void *vptr,v; c=10; v=0; cptr=&c; vptr=&v; printf("%c%v",c,v); }
main() { float me = 1.1; double you = 1.1; if(me==you) printf("I love U"); else printf("I hate U"); }
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.
void main() { int x,y=2,z; z=(z*=2)+(x=y=z); printf("%d",z); }