main()
{
char *p;
p="Hello";
printf("%c\n",*&*p);
}
Answer / susie
Answer :
H
Explanation:
* is a dereference operator & is a reference operator. They
can be applied any number of times provided it is
meaningful. Here p points to the first character in the
string "Hello". *p dereferences it and so its value is H.
Again & references it to an address and * dereferences it
to the value H.
| Is This Answer Correct ? | 4 Yes | 1 No |
main() { float f=5,g=10; enum{i=10,j=20,k=50}; printf("%d\n",++k); printf("%f\n",f<<2); printf("%lf\n",f%g); printf("%lf\n",fmod(f,g)); }
void main() { if(~0 == (unsigned int)-1) printf(“You can answer this if you know how values are represented in memory”); }
main() { printf("%d", out); } int out=100;
main() { int i=400,j=300; printf("%d..%d"); }
How do you write a program which produces its own source code as its output?
Write a C program to add two numbers before the main function is called.
main() { if ((1||0) && (0||1)) { 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
main() { int k=1; printf("%d==1 is ""%s",k,k==1?"TRUE":"FALSE"); }
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().
main() { int *ptr=(int*)malloc(sizeof(int)); *ptr=4; printf("%d",(*ptr)+++*ptr++); }
#define clrscr() 100 main() { clrscr(); printf("%d\n",clrscr()); }
How to reverse a String without using C functions ?
33 Answers Matrix, TCS, Wipro,