Since I have my Computer Science Board Exam on 2nd April, I was practicing Pointers in C++, for the first time. During that, I came across the following question in Arihant’s CBSE Chapterwise Solved Papers:
//Give the output of the following program segment. (Assume, all required header files are included in the program.)
void main ()
{
char *s="GOODLUCK";
for(int x=strlen(s)-1; x>=0; x--)
{
for(int y=0; y<=x; y++)
cout<<s[y];
cout<<endl;
}
}
The output of this given program is this:
GOODLUCK
GOODLUC
GOODLU
GOODL
GOOD
GOO
GO
G
So, this reminded me of one of my favorite clips from F.R.I.E.N.D.S. And, I decided to code it.
First, the scene I’m talking about:
Here’s the code:
#include<iostream.h>
#include<conio.h>
#include<string.h>
void main ()
{
clrscr();
char * Lisa="PHOEBE";
for (int x=0; strlen(Lisa)!=0; x++)
{
if (strlen(Lisa)==2)
cout<<*Lisa<<" as in "<<Lisa<<Lisa<<endl;
else if (strlen(Lisa)==1)
cout<<*Lisa<<" as in "<<"'Ello there mate!";
else
cout<<*Lisa<<" as in "<<Lisa<<endl;
Lisa++;
}
getch();
}
Quite short, and straight-forward. But, it was really exciting to figure it out for the first program about Pointers that I type out.
And, the output:

Well, it’s a pretty basic code, because I’ve been studying Cs only for 2 years, and am recently been introduced to Pointers. So, if there’s someone reading this, who’s studied programming as a major, I would really love to know how else we can code this, maybe using less number of if-else statements? Please do tell me in the comments!
Yeah, it was a short and simple post, because I just needed an excuse to talk about friends. The post I wrote when I finished it didn’t seem enough for my excitement about the show. This is one of my favorite scenes, the one that got stuck in my head then and there. I totally loved how Lisa Kudrow did the Australian accent as an element of surprise for the last E.
Phoebe is certainly the most quirky character I’ve ever come across in any show or any book. Her individual arc too is the best one among the six. She never fails to have the most unexpected replies and out of the box ideas! Lisa Kudrow’s portrayal made the character more relatable, more fun and most memorable! Who could’ve sung Smelly Cat better than her?
What are your favorite Phoebe moments? Looking forward to know them in the comment section, so I can go and watch all those scenes again, because honestly, I miss the show a lot.
Chandler has to be my fave! He was just awesome with the sarcasm
LikeLiked by 1 person
It’s really hard to choose one absolute fav among the 6. Chandler is absolutely the funniest, and most sarcastic person I’m seen. He’s legit taught me how to understand sarcasm.
LikeLike
Phoebe is the best! I like all Phoebe moments.
LikeLiked by 1 person
Absolutely, it’s very difficult to pick one over her other beyond perfect moments.
LikeLiked by 1 person
Something is wrong with the left phalange.
LikeLiked by 1 person
No one tops her driving skills 😂
LikeLiked by 1 person
Ahem. You’re talking to a fan. Chandler Bing’s as well.
LikeLiked by 1 person
I’m a all 6 fan, um maybe not Monica. But, seriously, can’t choose among them all.
LikeLiked by 1 person
I agree.
LikeLiked by 1 person