main()
{
int a[10];
printf("%d",*a+1-*a+3);
}
Answer / susie
Answer :
4
Explanation:
*a and -*a cancels out. The result is as simple as 1 + 3 = 4 !
Is This Answer Correct ? | 4 Yes | 0 No |
Is the following code legal? void main() { typedef struct a aType; aType someVariable; struct a { int x; aType *b; }; }
main() { printf("\nab"); printf("\bsi"); printf("\rha"); }
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.
main() { int *j; { int i=10; j=&i; } printf("%d",*j); }
int DIM(int array[]) { return sizeof(array)/sizeof(int ); } main() { int arr[10]; printf(“The dimension of the array is %d”, DIM(arr)); }
#include<conio.h> main() { int x,y=2,z,a; if(x=y%2) z=2; a=2; printf("%d %d ",z,x); }
struct Foo { char *pName; char *pAddress; }; main() { struct Foo *obj = malloc(sizeof(struct Foo)); clrscr(); obj->pName = malloc(100); obj->pAddress = malloc(100); strcpy(obj->pName,"Your Name"); strcpy(obj->pAddress, "Your Address"); free(obj); printf("%s", obj->pName); printf("%s", obj->pAddress); } a. Your Name, Your Address b. Your Address, Your Address c. Your Name Your Name d. None of the above
void main() { void *v; int integer=2; int *i=&integer; v=i; printf("%d",(int*)*v); }
#define FALSE -1 #define TRUE 1 #define NULL 0 main() { if(NULL) puts("NULL"); else if(FALSE) puts("TRUE"); else puts("FALSE"); }
main() { if (!(1&&0)) { printf("OK I am done."); } else { printf("OK I am gone."); } } a. OK I am done b. OK I am gone c. compile error d. none of the above
write the function. if all the character in string B appear in string A, return true, otherwise return false.
main() { char *p; int *q; long *r; p=q=r=0; p++; q++; r++; printf("%p...%p...%p",p,q,r); }