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() { int c[ ]={2.8,3.4,4,6.7,5}; int j,*p=c,*q=c; for(j=0;j<5;j++) { printf(" %d ",*c); ++q; } for(j=0;j<5;j++){ printf(" %d ",*p); ++p; } }
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().
struct point { int x; int y; }; struct point origin,*pp; main() { pp=&origin; printf("origin is(%d%d)\n",(*pp).x,(*pp).y); printf("origin is (%d%d)\n",pp->x,pp->y); }
#include<stdio.h> main() { struct xx { int x=3; char name[]="hello"; }; struct xx *s; printf("%d",s->x); printf("%s",s->name); }
given integer number,write a program that displays the number as follows: First line :all digits second line : all except the first digit . . . . Last line : the last digit
{ int *ptr=(int*)malloc(sizeof(int)); *ptr=4; printf("%d",(*ptr)+++*ptr++); }
Is the following code legal? struct a { int x; struct a *b; }
#include<stdio.h> int main() { int x=2,y; y=++x*x++*++x; printf("%d",y); } Output for this program is 64. can you explain how this output is come??
Finding a number multiplication of 8 with out using arithmetic operator
main() { char p[ ]="%d\n"; p[1] = 'c'; printf(p,65); }
How can you relate the function with the structure? Explain with an appropriate example.
#include<stdio.h> main() { struct xx { int x; struct yy { char s; struct xx *p; }; struct yy *q; }; }