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 |
‎#define good bad main() { int good=1; int bad=0; printf ("good is:%d",good); }
main() { static int var = 5; printf("%d ",var--); if(var) main(); }
main(int argc, char **argv) { printf("enter the character"); getchar(); sum(argv[1],argv[2]); } sum(num1,num2) int num1,num2; { return num1+num2; }
int i; main(){ int t; for ( t=4;scanf("%d",&i)-t;printf("%d\n",i)) printf("%d--",t--); } // If the inputs are 0,1,2,3 find the o/p
main() { int k=1; printf("%d==1 is ""%s",k,k==1?"TRUE":"FALSE"); }
program to find magic aquare using array
#define square(x) x*x main() { int i; i = 64/square(4); printf("%d",i); }
4 Answers Google, HCL, Quick Heal, WTF,
write a program to Insert in a sorted list
How to return multiple values from a function?
create a C-code that will display the total fare of a passenger of a taxi if the driver press enter,the timer will stop. Every 10 counts is 2 pesos. Initial value is 25.00
void main() { while(1){ if(printf("%d",printf("%d"))) break; else continue; } }
write a program in c to merge two array