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;
}
Discussion:
110 comments Page 9 of 11.
Spartacus9621 said:
8 years ago
Why we use static? Can anybody explain me the use of static?
Nani said:
1 decade ago
Can anyone please tell me why is ++p equal to pink here?
SelvaKarna said:
9 years ago
How to print white?
black?
pink?
Can any one tell me?
black?
pink?
Can any one tell me?
Beauty of the nation said:
1 decade ago
Please tell me how can we analyze this description.
Vinoth said:
1 decade ago
What is the use of static keyword in this program
Saravanan said:
1 decade ago
Any body can help me, where we use *** pointer?
Shreyas said:
9 years ago
Thanks @Adeel. It seemed simple and easy :).
Manohar said:
1 decade ago
Can somebody give clear explanation please.
Dipali said:
10 years ago
I can't understand. Please clrealy discuss.
Suchismita said:
1 decade ago
How can we print WHITE by using s pointer?
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers