TIP: Click on subject to list as thread! ANSI
echo: cis.languages
to: all
from: SCOTT HOWELL 70270,641
date: 1990-06-14 06:15:07
subject: #help with `c` index()

#: 4359 S3/Languages
    14-Jun-90  06:15:07
Sb: #help with 'c' index()
Fm: SCOTT HOWELL 70270,641
To: all

Help!!!!! Will some one help me this is 'mysterous' C function called index().

Here is what the Microware 'c' compiler says about index()

synopsis
        char *index(ptr,ch)
        char *ptr;

        ch

index() returns a pointer to the first occurence of the character ch in the
string pointed to by ptr. Returns null if char not found.

What I want to do is to print an integer indicating the location of that ch (ie
it would print the integer '3' for 'm' in 'computer'.)

Could someone write a small program that does this. The example in the manual
makes abs no sense.

There is 1 Reply.

SOURCE: compuserve via textfiles.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.