C Programming - Pointers - Discussion

Discussion Forum : Pointers - Find Output of Program (Q.No. 1)
1.
What will be the output of the program ?
#include<stdio.h>

int main()
{
    static char *s[] = {"black", "white", "pink", "violet"};
    char **ptr[] = {s+3, s+2, s+1, s}, ***p;
    p = ptr;
    ++p;
    printf("%s", **p+1);
    return 0;
}
ink
ack
ite
let
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
110 comments Page 8 of 11.

Vishal said:   1 decade ago
In this if we will not take static char then nothing will happen to o/p.

Vasu said:   8 years ago
If we want to print **++*__p what will be the answer? Please explain it.

ABC said:   1 decade ago
Please tell me how can we analyze char **ptr[] is reverse of char *s[].

Rohan said:   1 decade ago
Can any one explain me when to use single * and double ** in pointer?

Xyz said:   9 years ago
What is the output if we put %c instead of %s in printf statement?

Sriram said:   6 years ago
What is the meaning of ***p, **p, **ptr?

Please anyone explain.
(1)

Uhfgbh said:   4 months ago
Then where do we use *** pointer?

Anyone, please explain to me.

Manali said:   1 decade ago
Hey anybody can tell me exact meaning of more than one * sign?

Priya said:   9 years ago
I don't understanding the concept of ***p. Please explain me.

Uma said:   9 years ago
I am not understanding where we use the ***p anyone help me.


Post your comments here:

Your comments will be displayed after verification.