Interviewer And Interviewee Guide

Programming Algorithms Interview Question:

Write a function that finds the last instance of a character in a string

Submitted by: Administrator
char *lastchar(char *String, char ch)
{
char *pStr = NULL;

// traverse the entire string

while( * String ++ != NULL )
{
if( *String == ch )
pStr = String;
}

return pStr;
}
Submitted by: Administrator

Read Online Programming Algorithms Job Interview Questions And Answers
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.