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 11 of 11.
T.saipavan said:
1 decade ago
Why pointers are to be used?
Shreeshail said:
7 years ago
Not getting. Please Help me.
Prasanth said:
8 years ago
Thank you @Radhakrishna.
Rohit Patil said:
4 years ago
Thank you @Raghushri.
(5)
Bhas said:
1 decade ago
How **p+1 means ink?
Rahul said:
4 years ago
Thanks @Raghushri.
(3)
Swati said:
8 years ago
Thank you @Adeel.
Sasi said:
6 years ago
Thank you @Adeel.
A waste fellow said:
1 decade ago
thank u everyone
Aki said:
9 years ago
It's so useful.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers