main()

{

char *p;

p="Hello";

printf("%c\n",*&*p);

}



main() { char *p; p="Hello"; printf("%c\n"..

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

Post New Answer

More C Code Interview Questions

What is "far" and "near" pointers in "c"...?

3 Answers  


main() { char s[ ]="man"; int i; for(i=0;s[ i ];i++) printf("\n%c%c%c%c",s[ i ],*(s+i),*(i+s),i[s]); }

1 Answers   DCE,


To Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates. String contains only lowercase characters ['a'-'z']

0 Answers  


main() { int x=5; clrscr(); for(;x<= 0;x--) { printf("x=%d ", x--); } } a. 5, 3, 1 b. 5, 2, 1, c. 5, 3, 1, -1, 3 d. –3, -1, 1, 3, 5

2 Answers   HCL,


main() { char i=0; for(;i>=0;i++) ; printf("%d\n",i); }

2 Answers  






int i=10; main() { extern int i; { int i=20; { const volatile unsigned i=30; printf("%d",i); } printf("%d",i); } printf("%d",i); }

1 Answers  


Sir... please give some important coding questions asked by product companies..

0 Answers  


main() { int i=1; while (i<=5) { printf("%d",i); if (i>2) goto here; i++; } } fun() { here: printf("PP"); }

1 Answers  


Question: We would like to design and implement a programming solution to the reader-writer problem using semaphores in C language under UNIX. We assume that we have three readers and two writers processes that would run concurrently. A writer is to update (write) into one memory location (let’s say a variable of type integer named temp initialized to 0). In the other hand, a reader is to read the content of temp and display its content on the screen in a formatted output. One writer can access the shared data exclusively without the presence of other writer or any reader, whereas, a reader may access the shared memory for reading with the presence of other readers (but not writers).

1 Answers  


main() { int i=3; switch(i) { default:printf("zero"); case 1: printf("one"); break; case 2:printf("two"); break; case 3: printf("three"); break; } }

1 Answers  


Write a program to receive an integer and find its octal equivalent?

7 Answers  


void main() { char ch; for(ch=0;ch<=127;ch++) printf(“%c %d \n“, ch, ch); }

1 Answers  


Categories