Sponsors

How To Reverse A String Without Reversing The Punctuation On That Line – The Shining Part 3 Problem Solution In C

The Shining-Part3
Assume, in \The Shining-Part3″, the son makes it even worse by reversing the words in a sentence in place
but leaving the punctuations as they are. For example, the son writes \NUR, REHTOM! REDRUM!!” to
mean \RUN, MOTHER! MURDER!!”. Now the mother needs to understand the full sentence as it is but
she cannot get it through a mirror.
This time for the Part-3 of the lm, alert the mother by writing another code.

#include

int check(char c);
void print(char s[], int length);
int strlength(char s[]);
int main()
{
int i, j, length;
char s[5000], s1[5000];
printf(“Enter the string\n”);
gets(s);
///printf(“%d\n”,strlen(s));
///puts(s);
length=strlength(s); /// a function to determine the lenght of the string
///printf(“%d %d %d %d”,’A’,’a’,’Z’,’z’);
printf(“corrected string: “);
for(i=0,j=0;i<length;i++) { if(check(s[i])==1) /// a function to check s[i] { s1[j]=s[i]; j++; } else { print(s1,j); /// a function to reverse the word and print j=0; printf(“%c”,s[i]); } } print(s1,j); printf(“\n”); return 0; } int check(char c) { if(c>=’A’ && c<=’Z’) return 1; if(c>=’a’ && c<=’z’) return 1; return 0; } void print(char s[], int length) { int i; for(i=length-1;i>=0;i–)
{
printf(“%c”,s[i]);
}
}
int strlength(char s[])
{
int i;
for(i=0;s[i]!=’\0′;i++);
return i;
}

Wesbanco Inc (WSBC) Q3...

Wesbanco Soars: Q3 2025 Reports 68% Net Income Boost...

‘Committed to growth for...

Bluegrass Center for Autism: A Commitment to Personalized Client...

THE FREEPER CANTEEN –...

Boosting Morale: The Freeper Canteen Launches a Military Camo...

AI Startups Make Trial-and-Error...

AI Startups Are Redefining the Speed of Discovery In the...

The Fraudster Behind Steve...

The Fraudster Behind Steve Ballmer’s NBA Nightmare The intersection of...

Sim: MISI aims to...

Empowering Futures: How MISI is Building a Highly Skilled...

Wesbanco Inc (WSBC) Q3 2025 Earnings Call Highlights: Strong Financial Performance and …

Wesbanco Soars: Q3 2025 Reports 68% Net Income Boost and Strategic Optimization Wesbanco Inc. (WSBC) has released a stunning financial update, confirming a period of...

‘Committed to growth for our clients.’ Bluegrass Center for Autism aims to offer personalized care

Bluegrass Center for Autism: A Commitment to Personalized Client Growth In the specialized world of autism support, few institutions stand out for their dedication to...

THE FREEPER CANTEEN – The Name These Famous Military Camo Patterns Quiz – Wednesday, October 22, 2025

Boosting Morale: The Freeper Canteen Launches a Military Camo Patterns Quiz The Freeper Canteen, a steadfast pillar of support for military personnel and their families,...

AI Startups Make Trial-and-Error a Competitive Edge

AI Startups Are Redefining the Speed of Discovery In the highly competitive world of venture capital and high-tech innovation, a new theme is dominating the...

The Fraudster Behind Steve Ballmer’s NBA Nightmare

The Fraudster Behind Steve Ballmer’s NBA Nightmare The intersection of elite finance and professional sports often brings high risks, but few expect outright deception from...

Sim: MISI aims to nurture a highly skilled Indian community

Empowering Futures: How MISI is Building a Highly Skilled Indian Community in Malaysia Every significant life transformation begins with an opportunity. For the Indian community...

‘Patent BS!’: David Axelrod Roasts Trump’s Attempts to Blame Shutdown on Dems and Illegal Immigrants

'Patent BS!' David Axelrod Slams Trump's Shutdown Blame Game on X Veteran political strategist and CNN commentator David Axelrod took to X (formerly Twitter) on...

SL Green Realty Corp (SLG) Q3 2025 Earnings Call Highlights: Strategic Acquisitions and Robust …

SL Green Realty Corp (SLG) Q3 2025: Strategic Wins Define Earnings Call SL Green Realty Corp, Manhattan’s largest commercial office landlord, recently released the highlights...

The Independent’s “Record CO₂ Surge” Story: Hype Without Context

Debunking the Hype: Why the Recent CO₂ "Surge" Isn't Just Industrial Emissions Alarmist headlines are a fixture in modern climate reporting, and a recent story...